mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Switched to translations for better autoglossonym support
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
9f03f0f6f6
commit
018f71a157
315
resources/lang/en/localizations.php
Normal file
315
resources/lang/en/localizations.php
Normal file
|
@ -0,0 +1,315 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'select_language' => 'Select a language',
|
||||
'languages' => [
|
||||
'en'=> 'English, US',
|
||||
'en-GB'=> 'English, UK',
|
||||
'af'=> 'Afrikaans',
|
||||
'ar'=> 'Arabic',
|
||||
'bg'=> 'Bulgarian',
|
||||
'zh-CN'=> 'Chinese Simplified',
|
||||
'zh-TW'=> 'Chinese Traditional',
|
||||
'hr'=> 'Croatian',
|
||||
'cs'=> 'Czech',
|
||||
'da'=> 'Danish',
|
||||
'nl'=> 'Dutch',
|
||||
'en-ID'=> 'English, Indonesia',
|
||||
'et'=> 'Estonian',
|
||||
'fil'=> 'Filipino',
|
||||
'fi'=> 'Finnish',
|
||||
'fr'=> 'French',
|
||||
'de'=> 'German',
|
||||
'de-i'=> 'German (Informal)',
|
||||
'el'=> 'Greek',
|
||||
'he'=> 'Hebrew',
|
||||
'hu'=> 'Hungarian',
|
||||
'is' => 'Icelandic',
|
||||
'id'=> 'Indonesian',
|
||||
'ga-IE'=> 'Irish',
|
||||
'it'=> 'Italian',
|
||||
'ja'=> 'Japanese',
|
||||
'ko'=> 'Korean',
|
||||
'lv'=>'Latvian',
|
||||
'lt'=> 'Lithuanian',
|
||||
'mk'=> 'Macedonian',
|
||||
'ms'=> 'Malay',
|
||||
'mi'=> 'Maori',
|
||||
'mn'=> 'Mongolian',
|
||||
'no'=> 'Norwegian',
|
||||
'fa'=> 'Persian',
|
||||
'pl'=> 'Polish',
|
||||
'pt-PT'=> 'Portuguese',
|
||||
'pt-BR'=> 'Portuguese, Brazilian',
|
||||
'ro'=> 'Romanian',
|
||||
'ru'=> 'Russian',
|
||||
'sr-CS' => 'Serbian (Latin)',
|
||||
'sl'=> 'Slovenian',
|
||||
'es-ES'=> 'Spanish',
|
||||
'es-CO'=> 'Spanish, Colombia',
|
||||
'es-MX'=> 'Spanish, Mexico',
|
||||
'es-VE'=> 'Spanish, Venezuela',
|
||||
'sv-SE'=> 'Swedish',
|
||||
'tl'=> 'Tagalog',
|
||||
'ta'=> 'Tamil',
|
||||
'th'=> 'Thai',
|
||||
'tr'=> 'Turkish',
|
||||
'uk'=> 'Ukranian',
|
||||
'vi'=> 'Vietnamese',
|
||||
'cy'=> 'Welsh',
|
||||
'zu'=> 'Zulu',
|
||||
],
|
||||
|
||||
'select_country' => 'Select a country',
|
||||
|
||||
'countries' => [
|
||||
'AC'=>'Ascension Island',
|
||||
'AD'=>'Andorra',
|
||||
'AE'=>'United Arab Emirates',
|
||||
'AF'=>'Afghanistan',
|
||||
'AG'=>'Antigua And Barbuda',
|
||||
'AI'=>'Anguilla',
|
||||
'AL'=>'Albania',
|
||||
'AM'=>'Armenia',
|
||||
'AN'=>'Netherlands Antilles',
|
||||
'AO'=>'Angola',
|
||||
'AQ'=>'Antarctica',
|
||||
'AR'=>'Argentina',
|
||||
'AS'=>'American Samoa',
|
||||
'AT'=>'Austria',
|
||||
'AU'=>'Australia',
|
||||
'AW'=>'Aruba',
|
||||
'AX'=>'Ã…land',
|
||||
'AZ'=>'Azerbaijan',
|
||||
'BA'=>'Bosnia And Herzegovina',
|
||||
'BB'=>'Barbados',
|
||||
'BE'=>'Belgium',
|
||||
'BD'=>'Bangladesh',
|
||||
'BF'=>'Burkina Faso',
|
||||
'BG'=>'Bulgaria',
|
||||
'BH'=>'Bahrain',
|
||||
'BI'=>'Burundi',
|
||||
'BJ'=>'Benin',
|
||||
'BM'=>'Bermuda',
|
||||
'BN'=>'Brunei Darussalam',
|
||||
'BO'=>'Bolivia',
|
||||
'BR'=>'Brazil',
|
||||
'BS'=>'Bahamas',
|
||||
'BT'=>'Bhutan',
|
||||
'BV'=>'Bouvet Island',
|
||||
'BW'=>'Botswana',
|
||||
'BY'=>'Belarus',
|
||||
'BZ'=>'Belize',
|
||||
'CA'=>'Canada',
|
||||
'CC'=>'Cocos (Keeling) Islands',
|
||||
'CD'=>'Congo (Democratic Republic)',
|
||||
'CF'=>'Central African Republic',
|
||||
'CG'=>'Congo (Republic)',
|
||||
'CH'=>'Switzerland',
|
||||
'CI'=>'Côte d\'Ivoire',
|
||||
'CK'=>'Cook Islands',
|
||||
'CL'=>'Chile',
|
||||
'CM'=>'Cameroon',
|
||||
'CN'=>'People\'s Republic of China',
|
||||
'CO'=>'Colombia',
|
||||
'CR'=>'Costa Rica',
|
||||
'CU'=>'Cuba',
|
||||
'CV'=>'Cape Verde',
|
||||
'CX'=>'Christmas Island',
|
||||
'CY'=>'Cyprus',
|
||||
'CZ'=>'Czech Republic',
|
||||
'DE'=>'Germany',
|
||||
'DJ'=>'Djibouti',
|
||||
'DK'=>'Denmark',
|
||||
'DM'=>'Dominica',
|
||||
'DO'=>'Dominican Republic',
|
||||
'DZ'=>'Algeria',
|
||||
'EC'=>'Ecuador',
|
||||
'EE'=>'Estonia',
|
||||
'EG'=>'Egypt',
|
||||
'ER'=>'Eritrea',
|
||||
'ES'=>'Spain',
|
||||
'ET'=>'Ethiopia',
|
||||
'EU'=>'European Union',
|
||||
'FI'=>'Finland',
|
||||
'FJ'=>'Fiji',
|
||||
'FK'=>'Falkland Islands (Malvinas)',
|
||||
'FM'=>'Micronesia, Federated States Of',
|
||||
'FO'=>'Faroe Islands',
|
||||
'FR'=>'France',
|
||||
'GA'=>'Gabon',
|
||||
'GD'=>'Grenada',
|
||||
'GE'=>'Georgia',
|
||||
'GF'=>'French Guiana',
|
||||
'GG'=>'Guernsey',
|
||||
'GH'=>'Ghana',
|
||||
'GI'=>'Gibraltar',
|
||||
'GL'=>'Greenland',
|
||||
'GM'=>'Gambia',
|
||||
'GN'=>'Guinea',
|
||||
'GP'=>'Guadeloupe',
|
||||
'GQ'=>'Equatorial Guinea',
|
||||
'GR'=>'Greece',
|
||||
'GS'=>'South Georgia And The South Sandwich Islands',
|
||||
'GT'=>'Guatemala',
|
||||
'GU'=>'Guam',
|
||||
'GW'=>'Guinea-Bissau',
|
||||
'GY'=>'Guyana',
|
||||
'HK'=>'Hong Kong',
|
||||
'HM'=>'Heard And Mc Donald Islands',
|
||||
'HN'=>'Honduras',
|
||||
'HR'=>'Croatia (local name: Hrvatska)',
|
||||
'HT'=>'Haiti',
|
||||
'HU'=>'Hungary',
|
||||
'ID'=>'Indonesia',
|
||||
'IE'=>'Ireland',
|
||||
'IL'=>'Israel',
|
||||
'IM'=>'Isle of Man',
|
||||
'IN'=>'India',
|
||||
'IO'=>'British Indian Ocean Territory',
|
||||
'IQ'=>'Iraq',
|
||||
'IR'=>'Iran, Islamic Republic Of',
|
||||
'IS'=>'Iceland',
|
||||
'IT'=>'Italy',
|
||||
'JE'=>'Jersey',
|
||||
'JM'=>'Jamaica',
|
||||
'JO'=>'Jordan',
|
||||
'JP'=>'Japan',
|
||||
'KE'=>'Kenya',
|
||||
'KG'=>'Kyrgyzstan',
|
||||
'KH'=>'Cambodia',
|
||||
'KI'=>'Kiribati',
|
||||
'KM'=>'Comoros',
|
||||
'KN'=>'Saint Kitts And Nevis',
|
||||
'KR'=>'Korea, Republic Of',
|
||||
'KW'=>'Kuwait',
|
||||
'KY'=>'Cayman Islands',
|
||||
'KZ'=>'Kazakhstan',
|
||||
'LA'=>'Lao People\'s Democratic Republic',
|
||||
'LB'=>'Lebanon',
|
||||
'LC'=>'Saint Lucia',
|
||||
'LI'=>'Liechtenstein',
|
||||
'LK'=>'Sri Lanka',
|
||||
'LR'=>'Liberia',
|
||||
'LS'=>'Lesotho',
|
||||
'LT'=>'Lithuania',
|
||||
'LU'=>'Luxembourg',
|
||||
'LV'=>'Latvia',
|
||||
'LY'=>'Libyan Arab Jamahiriya',
|
||||
'MA'=>'Morocco',
|
||||
'MC'=>'Monaco',
|
||||
'MD'=>'Moldova, Republic Of',
|
||||
'ME'=>'Montenegro',
|
||||
'MG'=>'Madagascar',
|
||||
'MH'=>'Marshall Islands',
|
||||
'MK'=>'Macedonia, The Former Yugoslav Republic Of',
|
||||
'ML'=>'Mali',
|
||||
'MM'=>'Myanmar',
|
||||
'MN'=>'Mongolia',
|
||||
'MO'=>'Macau',
|
||||
'MP'=>'Northern Mariana Islands',
|
||||
'MQ'=>'Martinique',
|
||||
'MR'=>'Mauritania',
|
||||
'MS'=>'Montserrat',
|
||||
'MT'=>'Malta',
|
||||
'MU'=>'Mauritius',
|
||||
'MV'=>'Maldives',
|
||||
'MW'=>'Malawi',
|
||||
'MX'=>'Mexico',
|
||||
'MY'=>'Malaysia',
|
||||
'MZ'=>'Mozambique',
|
||||
'NA'=>'Namibia',
|
||||
'NC'=>'New Caledonia',
|
||||
'NE'=>'Niger',
|
||||
'NF'=>'Norfolk Island',
|
||||
'NG'=>'Nigeria',
|
||||
'NI'=>'Nicaragua',
|
||||
'NL'=>'Netherlands',
|
||||
'NO'=>'Norway',
|
||||
'NP'=>'Nepal',
|
||||
'NR'=>'Nauru',
|
||||
'NU'=>'Niue',
|
||||
'NZ'=>'New Zealand',
|
||||
'OM'=>'Oman',
|
||||
'PA'=>'Panama',
|
||||
'PE'=>'Peru',
|
||||
'PF'=>'French Polynesia',
|
||||
'PG'=>'Papua New Guinea',
|
||||
'PH'=>'Philippines, Republic of the',
|
||||
'PK'=>'Pakistan',
|
||||
'PL'=>'Poland',
|
||||
'PM'=>'St. Pierre And Miquelon',
|
||||
'PN'=>'Pitcairn',
|
||||
'PR'=>'Puerto Rico',
|
||||
'PS'=>'Palestine',
|
||||
'PT'=>'Portugal',
|
||||
'PW'=>'Palau',
|
||||
'PY'=>'Paraguay',
|
||||
'QA'=>'Qatar',
|
||||
'RE'=>'Reunion',
|
||||
'RO'=>'Romania',
|
||||
'RS'=>'Serbia',
|
||||
'RU'=>'Russian Federation',
|
||||
'RW'=>'Rwanda',
|
||||
'SA'=>'Saudi Arabia',
|
||||
'UK'=>'Scotland',
|
||||
'SB'=>'Solomon Islands',
|
||||
'SC'=>'Seychelles',
|
||||
'SD'=>'Sudan',
|
||||
'SE'=>'Sweden',
|
||||
'SG'=>'Singapore',
|
||||
'SH'=>'St. Helena',
|
||||
'SI'=>'Slovenia',
|
||||
'SJ'=>'Svalbard And Jan Mayen Islands',
|
||||
'SK'=>'Slovakia (Slovak Republic)',
|
||||
'SL'=>'Sierra Leone',
|
||||
'SM'=>'San Marino',
|
||||
'SN'=>'Senegal',
|
||||
'SO'=>'Somalia',
|
||||
'SR'=>'Suriname',
|
||||
'ST'=>'Sao Tome And Principe',
|
||||
'SU'=>'Soviet Union',
|
||||
'SV'=>'El Salvador',
|
||||
'SY'=>'Syrian Arab Republic',
|
||||
'SZ'=>'Swaziland',
|
||||
'TC'=>'Turks And Caicos Islands',
|
||||
'TD'=>'Chad',
|
||||
'TF'=>'French Southern Territories',
|
||||
'TG'=>'Togo',
|
||||
'TH'=>'Thailand',
|
||||
'TJ'=>'Tajikistan',
|
||||
'TK'=>'Tokelau',
|
||||
'TI'=>'East Timor',
|
||||
'TM'=>'Turkmenistan',
|
||||
'TN'=>'Tunisia',
|
||||
'TO'=>'Tonga',
|
||||
'TP'=>'East Timor (old code)',
|
||||
'TR'=>'Turkey',
|
||||
'TT'=>'Trinidad And Tobago',
|
||||
'TV'=>'Tuvalu',
|
||||
'TW'=>'Taiwan',
|
||||
'TZ'=>'Tanzania, United Republic Of',
|
||||
'UA'=>'Ukraine',
|
||||
'UG'=>'Uganda',
|
||||
'UK'=>'United Kingdom',
|
||||
'US'=>'United States',
|
||||
'UM'=>'United States Minor Outlying Islands',
|
||||
'UY'=>'Uruguay',
|
||||
'UZ'=>'Uzbekistan',
|
||||
'VA'=>'Vatican City State (Holy See)',
|
||||
'VC'=>'Saint Vincent And The Grenadines',
|
||||
'VE'=>'Venezuela',
|
||||
'VG'=>'Virgin Islands (British)',
|
||||
'VI'=>'Virgin Islands (U.S.)',
|
||||
'VN'=>'Viet Nam',
|
||||
'VU'=>'Vanuatu',
|
||||
'WF'=>'Wallis And Futuna Islands',
|
||||
'WS'=>'Samoa',
|
||||
'YE'=>'Yemen',
|
||||
'YT'=>'Mayotte',
|
||||
'ZA'=>'South Africa',
|
||||
'ZM'=>'Zambia',
|
||||
'ZW'=>'Zimbabwe',
|
||||
],
|
||||
];
|
|
@ -8,73 +8,15 @@
|
|||
* Generates the dropdown menu of available languages
|
||||
*/
|
||||
Form::macro('locales', function ($name = 'locale', $selected = null, $class = null, $id = null) {
|
||||
$locales = [
|
||||
''=> ' ',
|
||||
'en'=> 'English, US',
|
||||
'en-GB'=> 'English, UK',
|
||||
'af'=> 'Afrikaans',
|
||||
'ar'=> 'Arabic',
|
||||
'bg'=> 'Bulgarian',
|
||||
'zh-CN'=> 'Chinese Simplified',
|
||||
'zh-TW'=> 'Chinese Traditional',
|
||||
'hr'=> 'Croatian',
|
||||
'cs'=> 'Czech',
|
||||
'da'=> 'Danish',
|
||||
'nl'=> 'Dutch',
|
||||
'en-ID'=> 'English, Indonesia',
|
||||
'et'=> 'Estonian',
|
||||
'fil'=> 'Filipino',
|
||||
'fi'=> 'Finnish',
|
||||
'fr'=> 'French',
|
||||
'de'=> 'German',
|
||||
'de-i'=> 'German (Informal)',
|
||||
'el'=> 'Greek',
|
||||
'he'=> 'Hebrew',
|
||||
'hu'=> 'Hungarian',
|
||||
'is' => 'Icelandic',
|
||||
'id'=> 'Indonesian',
|
||||
'ga-IE'=> 'Irish',
|
||||
'it'=> 'Italian',
|
||||
'ja'=> 'Japanese',
|
||||
'ko'=> 'Korean',
|
||||
'lv'=>'Latvian',
|
||||
'lt'=> 'Lithuanian',
|
||||
'mk'=> 'Macedonian',
|
||||
'ms'=> 'Malay',
|
||||
'mi'=> 'Maori',
|
||||
'mn'=> 'Mongolian',
|
||||
'no'=> 'Norwegian',
|
||||
'fa'=> 'Persian',
|
||||
'pl'=> 'Polish',
|
||||
'pt-PT'=> 'Portuguese',
|
||||
'pt-BR'=> 'Portuguese, Brazilian',
|
||||
'ro'=> 'Romanian',
|
||||
'ru'=> 'Russian',
|
||||
'sr-CS' => 'Serbian (Latin)',
|
||||
'sl'=> 'Slovenian',
|
||||
'es-ES'=> 'Spanish',
|
||||
'es-CO'=> 'Spanish, Colombia',
|
||||
'es-MX'=> 'Spanish, Mexico',
|
||||
'es-VE'=> 'Spanish, Venezuela',
|
||||
'sv-SE'=> 'Swedish',
|
||||
'tl'=> 'Tagalog',
|
||||
'ta'=> 'Tamil',
|
||||
'th'=> 'Thai',
|
||||
'tr'=> 'Turkish',
|
||||
'uk'=> 'Ukranian',
|
||||
'vi'=> 'Vietnamese',
|
||||
'cy'=> 'Welsh',
|
||||
'zu'=> 'Zulu',
|
||||
];
|
||||
|
||||
$idclause = '';
|
||||
if ($id) {
|
||||
$idclause = " id='$id'";
|
||||
}
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:350px"'.$idclause.' aria-label="'.$name.'">';
|
||||
$idclause = (!is_null($id)) ? $id : '';
|
||||
|
||||
foreach ($locales as $abbr => $locale) {
|
||||
$select .= '<option value="'.$abbr.'"'.($selected == $abbr ? ' selected="selected"' : '').'>'.$locale.'</option> ';
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:350px"'.$idclause.' aria-label="'.$name.'" data-placeholder="'.trans('localizations.select_language').'">';
|
||||
$select .= '<option value="" role="option">'.trans('localizations.select_language').'</option>';
|
||||
|
||||
// Pull the autoglossonym array from the localizations translation file
|
||||
foreach (trans('localizations.languages') as $abbr => $locale) {
|
||||
$select .= '<option value="'.$abbr.'"'.(($selected == $abbr) ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"').'>'.$locale.'</option> ';
|
||||
}
|
||||
|
||||
$select .= '</select>';
|
||||
|
@ -87,264 +29,14 @@ Form::macro('locales', function ($name = 'locale', $selected = null, $class = nu
|
|||
* Generates the dropdown menu of countries for the profile form
|
||||
*/
|
||||
Form::macro('countries', function ($name = 'country', $selected = null, $class = null, $id = null) {
|
||||
$countries = [
|
||||
''=>'Select a Country',
|
||||
'AC'=>'Ascension Island',
|
||||
'AD'=>'Andorra',
|
||||
'AE'=>'United Arab Emirates',
|
||||
'AF'=>'Afghanistan',
|
||||
'AG'=>'Antigua And Barbuda',
|
||||
'AI'=>'Anguilla',
|
||||
'AL'=>'Albania',
|
||||
'AM'=>'Armenia',
|
||||
'AN'=>'Netherlands Antilles',
|
||||
'AO'=>'Angola',
|
||||
'AQ'=>'Antarctica',
|
||||
'AR'=>'Argentina',
|
||||
'AS'=>'American Samoa',
|
||||
'AT'=>'Austria',
|
||||
'AU'=>'Australia',
|
||||
'AW'=>'Aruba',
|
||||
'AX'=>'Ã…land',
|
||||
'AZ'=>'Azerbaijan',
|
||||
'BA'=>'Bosnia And Herzegovina',
|
||||
'BB'=>'Barbados',
|
||||
'BE'=>'Belgium',
|
||||
'BD'=>'Bangladesh',
|
||||
'BF'=>'Burkina Faso',
|
||||
'BG'=>'Bulgaria',
|
||||
'BH'=>'Bahrain',
|
||||
'BI'=>'Burundi',
|
||||
'BJ'=>'Benin',
|
||||
'BM'=>'Bermuda',
|
||||
'BN'=>'Brunei Darussalam',
|
||||
'BO'=>'Bolivia',
|
||||
'BR'=>'Brazil',
|
||||
'BS'=>'Bahamas',
|
||||
'BT'=>'Bhutan',
|
||||
'BV'=>'Bouvet Island',
|
||||
'BW'=>'Botswana',
|
||||
'BY'=>'Belarus',
|
||||
'BZ'=>'Belize',
|
||||
'CA'=>'Canada',
|
||||
'CC'=>'Cocos (Keeling) Islands',
|
||||
'CD'=>'Congo (Democratic Republic)',
|
||||
'CF'=>'Central African Republic',
|
||||
'CG'=>'Congo (Republic)',
|
||||
'CH'=>'Switzerland',
|
||||
'CI'=>'Côte d\'Ivoire',
|
||||
'CK'=>'Cook Islands',
|
||||
'CL'=>'Chile',
|
||||
'CM'=>'Cameroon',
|
||||
'CN'=>'People\'s Republic of China',
|
||||
'CO'=>'Colombia',
|
||||
'CR'=>'Costa Rica',
|
||||
'CU'=>'Cuba',
|
||||
'CV'=>'Cape Verde',
|
||||
'CX'=>'Christmas Island',
|
||||
'CY'=>'Cyprus',
|
||||
'CZ'=>'Czech Republic',
|
||||
'DE'=>'Germany',
|
||||
'DJ'=>'Djibouti',
|
||||
'DK'=>'Denmark',
|
||||
'DM'=>'Dominica',
|
||||
'DO'=>'Dominican Republic',
|
||||
'DZ'=>'Algeria',
|
||||
'EC'=>'Ecuador',
|
||||
'EE'=>'Estonia',
|
||||
'EG'=>'Egypt',
|
||||
'ER'=>'Eritrea',
|
||||
'ES'=>'Spain',
|
||||
'ET'=>'Ethiopia',
|
||||
'EU'=>'European Union',
|
||||
'FI'=>'Finland',
|
||||
'FJ'=>'Fiji',
|
||||
'FK'=>'Falkland Islands (Malvinas)',
|
||||
'FM'=>'Micronesia, Federated States Of',
|
||||
'FO'=>'Faroe Islands',
|
||||
'FR'=>'France',
|
||||
'GA'=>'Gabon',
|
||||
'GD'=>'Grenada',
|
||||
'GE'=>'Georgia',
|
||||
'GF'=>'French Guiana',
|
||||
'GG'=>'Guernsey',
|
||||
'GH'=>'Ghana',
|
||||
'GI'=>'Gibraltar',
|
||||
'GL'=>'Greenland',
|
||||
'GM'=>'Gambia',
|
||||
'GN'=>'Guinea',
|
||||
'GP'=>'Guadeloupe',
|
||||
'GQ'=>'Equatorial Guinea',
|
||||
'GR'=>'Greece',
|
||||
'GS'=>'South Georgia And The South Sandwich Islands',
|
||||
'GT'=>'Guatemala',
|
||||
'GU'=>'Guam',
|
||||
'GW'=>'Guinea-Bissau',
|
||||
'GY'=>'Guyana',
|
||||
'HK'=>'Hong Kong',
|
||||
'HM'=>'Heard And Mc Donald Islands',
|
||||
'HN'=>'Honduras',
|
||||
'HR'=>'Croatia (local name: Hrvatska)',
|
||||
'HT'=>'Haiti',
|
||||
'HU'=>'Hungary',
|
||||
'ID'=>'Indonesia',
|
||||
'IE'=>'Ireland',
|
||||
'IL'=>'Israel',
|
||||
'IM'=>'Isle of Man',
|
||||
'IN'=>'India',
|
||||
'IO'=>'British Indian Ocean Territory',
|
||||
'IQ'=>'Iraq',
|
||||
'IR'=>'Iran, Islamic Republic Of',
|
||||
'IS'=>'Iceland',
|
||||
'IT'=>'Italy',
|
||||
'JE'=>'Jersey',
|
||||
'JM'=>'Jamaica',
|
||||
'JO'=>'Jordan',
|
||||
'JP'=>'Japan',
|
||||
'KE'=>'Kenya',
|
||||
'KG'=>'Kyrgyzstan',
|
||||
'KH'=>'Cambodia',
|
||||
'KI'=>'Kiribati',
|
||||
'KM'=>'Comoros',
|
||||
'KN'=>'Saint Kitts And Nevis',
|
||||
'KR'=>'Korea, Republic Of',
|
||||
'KW'=>'Kuwait',
|
||||
'KY'=>'Cayman Islands',
|
||||
'KZ'=>'Kazakhstan',
|
||||
'LA'=>'Lao People\'s Democratic Republic',
|
||||
'LB'=>'Lebanon',
|
||||
'LC'=>'Saint Lucia',
|
||||
'LI'=>'Liechtenstein',
|
||||
'LK'=>'Sri Lanka',
|
||||
'LR'=>'Liberia',
|
||||
'LS'=>'Lesotho',
|
||||
'LT'=>'Lithuania',
|
||||
'LU'=>'Luxembourg',
|
||||
'LV'=>'Latvia',
|
||||
'LY'=>'Libyan Arab Jamahiriya',
|
||||
'MA'=>'Morocco',
|
||||
'MC'=>'Monaco',
|
||||
'MD'=>'Moldova, Republic Of',
|
||||
'ME'=>'Montenegro',
|
||||
'MG'=>'Madagascar',
|
||||
'MH'=>'Marshall Islands',
|
||||
'MK'=>'Macedonia, The Former Yugoslav Republic Of',
|
||||
'ML'=>'Mali',
|
||||
'MM'=>'Myanmar',
|
||||
'MN'=>'Mongolia',
|
||||
'MO'=>'Macau',
|
||||
'MP'=>'Northern Mariana Islands',
|
||||
'MQ'=>'Martinique',
|
||||
'MR'=>'Mauritania',
|
||||
'MS'=>'Montserrat',
|
||||
'MT'=>'Malta',
|
||||
'MU'=>'Mauritius',
|
||||
'MV'=>'Maldives',
|
||||
'MW'=>'Malawi',
|
||||
'MX'=>'Mexico',
|
||||
'MY'=>'Malaysia',
|
||||
'MZ'=>'Mozambique',
|
||||
'NA'=>'Namibia',
|
||||
'NC'=>'New Caledonia',
|
||||
'NE'=>'Niger',
|
||||
'NF'=>'Norfolk Island',
|
||||
'NG'=>'Nigeria',
|
||||
'NI'=>'Nicaragua',
|
||||
'NL'=>'Netherlands',
|
||||
'NO'=>'Norway',
|
||||
'NP'=>'Nepal',
|
||||
'NR'=>'Nauru',
|
||||
'NU'=>'Niue',
|
||||
'NZ'=>'New Zealand',
|
||||
'OM'=>'Oman',
|
||||
'PA'=>'Panama',
|
||||
'PE'=>'Peru',
|
||||
'PF'=>'French Polynesia',
|
||||
'PG'=>'Papua New Guinea',
|
||||
'PH'=>'Philippines, Republic of the',
|
||||
'PK'=>'Pakistan',
|
||||
'PL'=>'Poland',
|
||||
'PM'=>'St. Pierre And Miquelon',
|
||||
'PN'=>'Pitcairn',
|
||||
'PR'=>'Puerto Rico',
|
||||
'PS'=>'Palestine',
|
||||
'PT'=>'Portugal',
|
||||
'PW'=>'Palau',
|
||||
'PY'=>'Paraguay',
|
||||
'QA'=>'Qatar',
|
||||
'RE'=>'Reunion',
|
||||
'RO'=>'Romania',
|
||||
'RS'=>'Serbia',
|
||||
'RU'=>'Russian Federation',
|
||||
'RW'=>'Rwanda',
|
||||
'SA'=>'Saudi Arabia',
|
||||
'UK'=>'Scotland',
|
||||
'SB'=>'Solomon Islands',
|
||||
'SC'=>'Seychelles',
|
||||
'SD'=>'Sudan',
|
||||
'SE'=>'Sweden',
|
||||
'SG'=>'Singapore',
|
||||
'SH'=>'St. Helena',
|
||||
'SI'=>'Slovenia',
|
||||
'SJ'=>'Svalbard And Jan Mayen Islands',
|
||||
'SK'=>'Slovakia (Slovak Republic)',
|
||||
'SL'=>'Sierra Leone',
|
||||
'SM'=>'San Marino',
|
||||
'SN'=>'Senegal',
|
||||
'SO'=>'Somalia',
|
||||
'SR'=>'Suriname',
|
||||
'ST'=>'Sao Tome And Principe',
|
||||
'SU'=>'Soviet Union',
|
||||
'SV'=>'El Salvador',
|
||||
'SY'=>'Syrian Arab Republic',
|
||||
'SZ'=>'Swaziland',
|
||||
'TC'=>'Turks And Caicos Islands',
|
||||
'TD'=>'Chad',
|
||||
'TF'=>'French Southern Territories',
|
||||
'TG'=>'Togo',
|
||||
'TH'=>'Thailand',
|
||||
'TJ'=>'Tajikistan',
|
||||
'TK'=>'Tokelau',
|
||||
'TI'=>'East Timor',
|
||||
'TM'=>'Turkmenistan',
|
||||
'TN'=>'Tunisia',
|
||||
'TO'=>'Tonga',
|
||||
'TP'=>'East Timor (old code)',
|
||||
'TR'=>'Turkey',
|
||||
'TT'=>'Trinidad And Tobago',
|
||||
'TV'=>'Tuvalu',
|
||||
'TW'=>'Taiwan',
|
||||
'TZ'=>'Tanzania, United Republic Of',
|
||||
'UA'=>'Ukraine',
|
||||
'UG'=>'Uganda',
|
||||
'UK'=>'United Kingdom',
|
||||
'US'=>'United States',
|
||||
'UM'=>'United States Minor Outlying Islands',
|
||||
'UY'=>'Uruguay',
|
||||
'UZ'=>'Uzbekistan',
|
||||
'VA'=>'Vatican City State (Holy See)',
|
||||
'VC'=>'Saint Vincent And The Grenadines',
|
||||
'VE'=>'Venezuela',
|
||||
'VG'=>'Virgin Islands (British)',
|
||||
'VI'=>'Virgin Islands (U.S.)',
|
||||
'VN'=>'Viet Nam',
|
||||
'VU'=>'Vanuatu',
|
||||
'WF'=>'Wallis And Futuna Islands',
|
||||
'WS'=>'Samoa',
|
||||
'YE'=>'Yemen',
|
||||
'YT'=>'Mayotte',
|
||||
'ZA'=>'South Africa',
|
||||
'ZM'=>'Zambia',
|
||||
'ZW'=>'Zimbabwe',
|
||||
];
|
||||
|
||||
$idclause = '';
|
||||
if ($id) {
|
||||
$idclause = " id='$id'";
|
||||
}
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:350px"'.$idclause.' aria-label="'.$name.'">';
|
||||
$idclause = (!is_null($id)) ? $id : '';
|
||||
|
||||
foreach ($countries as $abbr => $country) {
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:350px"'.$idclause.' aria-label="'.$name.'" data-placeholder="'.trans('localizations.select_country').'">';
|
||||
$select .= '<option value="" role="option">'.trans('localizations.select_country').'</option>';
|
||||
|
||||
// Pull the autoglossonym array from the localizations translation file
|
||||
foreach (trans('localizations.countries') as $abbr => $country) {
|
||||
$select .= '<option value="'.strtoupper($abbr).'"'.(strtoupper($selected) == strtoupper($abbr) ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"').'>'.$country.'</option> ';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue