MOBILE-2261 utils: Implement several Utils providers

main
Dani Palou 2017-11-06 17:17:11 +01:00
parent a5987d0846
commit a4eb66062a
38 changed files with 11588 additions and 2 deletions

5
package-lock.json generated
View File

@ -69,6 +69,11 @@
"resolved": "https://registry.npmjs.org/@ionic-native/globalization/-/globalization-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/globalization/-/globalization-4.3.2.tgz",
"integrity": "sha512-sDyriA3/xspu6RM8arEOlhOkSxvRwLDNdvbBoZ59i+Dn5i6bjoE4hMMEFvUlnzvOZKn5GusurrWPz5cmfA9aPw==" "integrity": "sha512-sDyriA3/xspu6RM8arEOlhOkSxvRwLDNdvbBoZ59i+Dn5i6bjoE4hMMEFvUlnzvOZKn5GusurrWPz5cmfA9aPw=="
}, },
"@ionic-native/in-app-browser": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/@ionic-native/in-app-browser/-/in-app-browser-4.3.3.tgz",
"integrity": "sha512-mvHelgEVvTwFBCzcWAM0uN2JMhhPjY/k6UGhJzpn8LHMQ7FG2C7ofgZ8v2dy6WHaxGNBfHL+OEQqh5Ds28tkBg=="
},
"@ionic-native/keyboard": { "@ionic-native/keyboard": {
"version": "4.3.2", "version": "4.3.2",
"resolved": "https://registry.npmjs.org/@ionic-native/keyboard/-/keyboard-4.3.2.tgz", "resolved": "https://registry.npmjs.org/@ionic-native/keyboard/-/keyboard-4.3.2.tgz",

View File

@ -37,6 +37,7 @@
"@ionic-native/clipboard": "^4.3.2", "@ionic-native/clipboard": "^4.3.2",
"@ionic-native/core": "4.3.0", "@ionic-native/core": "4.3.0",
"@ionic-native/globalization": "^4.3.2", "@ionic-native/globalization": "^4.3.2",
"@ionic-native/in-app-browser": "^4.3.3",
"@ionic-native/keyboard": "^4.3.2", "@ionic-native/keyboard": "^4.3.2",
"@ionic-native/network": "^4.3.2", "@ionic-native/network": "^4.3.2",
"@ionic-native/splash-screen": "4.3.0", "@ionic-native/splash-screen": "4.3.0",

View File

@ -17,6 +17,12 @@ import { CoreAppProvider } from '../providers/app';
import { CoreConfigProvider } from '../providers/config'; import { CoreConfigProvider } from '../providers/config';
import { CoreEmulatorModule } from '../core/emulator/emulator.module'; import { CoreEmulatorModule } from '../core/emulator/emulator.module';
import { CoreLangProvider } from '../providers/lang'; import { CoreLangProvider } from '../providers/lang';
import { CoreTextUtilsProvider } from '../providers/utils/text';
import { CoreDomUtilsProvider } from '../providers/utils/dom';
import { CoreTimeUtilsProvider } from '../providers/utils/time';
import { CoreUrlUtilsProvider } from '../providers/utils/url';
import { CoreUtilsProvider } from '../providers/utils/utils';
import { CoreMimetypeUtilsProvider } from '../providers/utils/mimetype';
// For translate loader. AoT requires an exported function for factories. // For translate loader. AoT requires an exported function for factories.
export function createTranslateLoader(http: HttpClient) { export function createTranslateLoader(http: HttpClient) {
@ -54,7 +60,13 @@ export function createTranslateLoader(http: HttpClient) {
CoreDbProvider, CoreDbProvider,
CoreAppProvider, CoreAppProvider,
CoreConfigProvider, CoreConfigProvider,
CoreLangProvider CoreLangProvider,
CoreTextUtilsProvider,
CoreDomUtilsProvider,
CoreTimeUtilsProvider,
CoreUrlUtilsProvider,
CoreUtilsProvider,
CoreMimetypeUtilsProvider
] ]
}) })
export class AppModule {} export class AppModule {}

View File

@ -0,0 +1,248 @@
{
"AW": "آروبا",
"AZ": "أذربيجان",
"AM": "أرمينيا",
"ES": "أسبانيا",
"AU": "أستراليا",
"AF": "أفغانستان",
"AL": "ألبانيا",
"DE": "ألمانيا",
"AG": "أنتيجوا وبربودا",
"AO": "أنجولا",
"AI": "أنجويلا",
"AD": "أندورا",
"UY": "أورجواي",
"UZ": "أوزبكستان",
"UG": "أوغندا",
"UA": "أوكرانيا",
"IE": "أيرلندا",
"IS": "أيسلندا",
"ET": "اثيوبيا",
"ER": "اريتريا",
"EE": "استونيا",
"IL": "اسرائيل",
"AR": "الأرجنتين",
"JO": "الأردن",
"EC": "الاكوادور",
"AE": "الامارات العربية المتحدة",
"BS": "الباهاما",
"BH": "البحرين",
"BR": "البرازيل",
"PT": "البرتغال",
"BA": "البوسنة والهرسك",
"GA": "الجابون",
"ME": "الجبل الأسود",
"DZ": "الجزائر",
"DK": "الدانمرك",
"CV": "الرأس الأخضر",
"SV": "السلفادور",
"SN": "السنغال",
"SD": "السودان",
"SE": "السويد",
"EH": "الصحراء الغربية",
"SO": "الصومال",
"CN": "الصين",
"IQ": "العراق",
"VA": "الفاتيكان",
"PH": "الفيلبين",
"AQ": "القطب الجنوبي",
"CM": "الكاميرون",
"CG": "الكونغو - برازافيل",
"KW": "الكويت",
"HU": "المجر",
"IO": "المحيط الهندي البريطاني",
"MA": "المغرب",
"TF": "المقاطعات الجنوبية الفرنسية",
"MX": "المكسيك",
"SA": "المملكة العربية السعودية",
"GB": "المملكة المتحدة",
"NO": "النرويج",
"AT": "النمسا",
"NE": "النيجر",
"IN": "الهند",
"US": "الولايات المتحدة الأمريكية",
"JP": "اليابان",
"YE": "اليمن",
"GR": "اليونان",
"ID": "اندونيسيا",
"IR": "ايران",
"IT": "ايطاليا",
"PG": "بابوا غينيا الجديدة",
"PY": "باراجواي",
"PK": "باكستان",
"PW": "بالاو",
"BW": "بتسوانا",
"PN": "بتكايرن",
"BB": "بربادوس",
"BM": "برمودا",
"BN": "بروناي",
"BE": "بلجيكا",
"BG": "بلغاريا",
"BZ": "بليز",
"BD": "بنجلاديش",
"PA": "بنما",
"BJ": "بنين",
"BT": "بوتان",
"PR": "بورتوريكو",
"BF": "بوركينا فاسو",
"BI": "بوروندي",
"PL": "بولندا",
"BO": "بوليفيا",
"PF": "بولينيزيا الفرنسية",
"PE": "بيرو",
"TZ": "تانزانيا",
"TH": "تايلند",
"TW": "تايوان",
"TM": "تركمانستان",
"TR": "تركيا",
"TT": "ترينيداد وتوباغو",
"TD": "تشاد",
"TG": "توجو",
"TV": "توفالو",
"TK": "توكيلو",
"TO": "تونجا",
"TN": "تونس",
"TL": "تيمور الشرقية",
"JM": "جامايكا",
"GI": "جبل طارق",
"GD": "جرينادا",
"GL": "جرينلاند",
"AX": "جزر أولان",
"AN": "جزر الأنتيل الهولندية",
"TC": "جزر الترك وجايكوس",
"KM": "جزر القمر",
"KY": "جزر الكايمن",
"MH": "جزر المارشال",
"MV": "جزر الملديف",
"UM": "جزر الولايات المتحدة البعيدة الصغيرة",
"SB": "جزر سليمان",
"FO": "جزر فارو",
"VI": "جزر فرجين الأمريكية",
"VG": "جزر فرجين البريطانية",
"FK": "جزر فوكلاند",
"CK": "جزر كوك",
"CC": "جزر كوكوس",
"MP": "جزر ماريانا الشمالية",
"WF": "جزر والس وفوتونا",
"CX": "جزيرة الكريسماس",
"BV": "جزيرة بوفيه",
"IM": "جزيرة مان",
"NF": "جزيرة نورفوك",
"HM": "جزيرة هيرد وماكدونالد",
"CF": "جمهورية افريقيا الوسطى",
"CZ": "جمهورية التشيك",
"DO": "جمهورية الدومينيك",
"CD": "جمهورية الكونغو الديمقراطية",
"ZA": "جمهورية جنوب افريقيا",
"GT": "جواتيمالا",
"GP": "جوادلوب",
"GU": "جوام",
"GE": "جورجيا",
"GS": "جورجيا الجنوبية وجزر ساندويتش الجنوبية",
"DJ": "جيبوتي",
"JE": "جيرسي",
"DM": "دومينيكا",
"RW": "رواندا",
"RU": "روسيا",
"BY": "روسيا البيضاء",
"RO": "رومانيا",
"RE": "روينيون",
"ZM": "زامبيا",
"ZW": "زيمبابوي",
"CI": "ساحل العاج",
"WS": "ساموا",
"AS": "ساموا الأمريكية",
"SM": "سان مارينو",
"PM": "سانت بيير وميكولون",
"VC": "سانت فنسنت وغرنادين",
"KN": "سانت كيتس ونيفيس",
"LC": "سانت لوسيا",
"MF": "سانت مارتين",
"SH": "سانت هيلنا",
"ST": "ساو تومي وبرينسيبي",
"LK": "سريلانكا",
"SJ": "سفالبارد وجان مايان",
"SK": "سلوفاكيا",
"SI": "سلوفينيا",
"SG": "سنغافورة",
"SZ": "سوازيلاند",
"SY": "سوريا",
"SR": "سورينام",
"CH": "سويسرا",
"SL": "سيراليون",
"SC": "سيشل",
"CL": "شيلي",
"RS": "صربيا",
"CS": "صربيا والجبل الأسود",
"TJ": "طاجكستان",
"OM": "عمان",
"GM": "غامبيا",
"GH": "غانا",
"GF": "غويانا",
"GY": "غيانا",
"GN": "غينيا",
"GQ": "غينيا الاستوائية",
"GW": "غينيا بيساو",
"VU": "فانواتو",
"FR": "فرنسا",
"PS": "فلسطين",
"VE": "فنزويلا",
"FI": "فنلندا",
"VN": "فيتنام",
"FJ": "فيجي",
"CY": "قبرص",
"KG": "قرغيزستان",
"QA": "قطر",
"KZ": "كازاخستان",
"NC": "كاليدونيا الجديدة",
"HR": "كرواتيا",
"KH": "كمبوديا",
"CA": "كندا",
"CU": "كوبا",
"KR": "كوريا الجنوبية",
"KP": "كوريا الشمالية",
"CR": "كوستاريكا",
"CO": "كولومبيا",
"KI": "كيريباتي",
"KE": "كينيا",
"LV": "لاتفيا",
"LA": "لاوس",
"LB": "لبنان",
"LU": "لوكسمبورج",
"LY": "ليبيا",
"LR": "ليبيريا",
"LT": "ليتوانيا",
"LI": "ليختنشتاين",
"LS": "ليسوتو",
"MQ": "مارتينيك",
"MO": "ماكاو الصينية",
"MT": "مالطا",
"ML": "مالي",
"MY": "ماليزيا",
"YT": "مايوت",
"MG": "مدغشقر",
"EG": "مصر",
"MK": "مقدونيا",
"MW": "ملاوي",
"ZZ": "منطقة غير معرفة",
"MN": "منغوليا",
"MR": "موريتانيا",
"MU": "موريشيوس",
"MZ": "موزمبيق",
"MD": "مولدافيا",
"MC": "موناكو",
"MS": "مونتسرات",
"MM": "ميانمار",
"FM": "ميكرونيزيا",
"NA": "ناميبيا",
"NR": "نورو",
"NP": "نيبال",
"NG": "نيجيريا",
"NI": "نيكاراجوا",
"NZ": "نيوزيلاندا",
"NU": "نيوي",
"HT": "هايتي",
"HN": "هندوراس",
"NL": "هولندا",
"HK": "هونج كونج الصينية"
}

View File

@ -0,0 +1,250 @@
{
"AU": "Австралия",
"AT": "Австрия",
"AZ": "Азербайджан",
"AX": "Аландски о-ви",
"AL": "Албания",
"DZ": "Алжир",
"AS": "Американско Самоа",
"AO": "Ангола",
"AI": "Ангуила",
"AD": "Андора",
"AQ": "Антарктика",
"AG": "Антигуа и Барбуда",
"AR": "Аржентина",
"AM": "Армения",
"AW": "Аруба",
"AF": "Афганистан",
"BD": "Бангладеш",
"BB": "Барбадос",
"BS": "Бахами",
"BH": "Бахрейн",
"BY": "Беларус",
"BE": "Белгия",
"BZ": "Белиз",
"BJ": "Бенин",
"BM": "Бермуда",
"BO": "Боливия",
"BA": "Босна и Херцеговина",
"BW": "Ботсуана",
"BR": "Бразилия",
"VG": "Британски Вирджински острони",
"IO": "Британски територии в Индийския океан",
"BN": "Бруней Дарусалам",
"CI": "Бряг на слоновата кост",
"BF": "Буркина Фасо",
"BI": "Бурунди",
"BT": "Бутан",
"BG": "България",
"VU": "Вануату",
"VE": "Венецуела",
"VN": "Виетнам",
"GA": "Габон",
"GM": "Гамбия",
"GH": "Гана",
"GP": "Гваделупа",
"GT": "Гватемала",
"GY": "Гвиана",
"GN": "Гвинея",
"GW": "Гвинея-Бисау",
"DE": "Германия",
"GI": "Гибралтар",
"GD": "Гренада",
"GL": "Гренландия",
"GE": "Грузия",
"GU": "Гуам",
"GR": "Гърция",
"DK": "Дания",
"CD": "Демократична република Конго",
"DJ": "Джибути",
"DM": "Доминика",
"DO": "Доминиканска република",
"EG": "Египет",
"EC": "Еквадор",
"GQ": "Екваториална Гвинея",
"SV": "Ел Салвадор",
"ER": "Еритрея",
"EE": "Естония",
"ET": "Етиопия",
"ZM": "Замбия",
"EH": "Западна Сахара",
"ZW": "Зимбабве",
"IL": "Израел",
"TL": "Източен Тимор",
"IN": "Индия",
"ID": "Индонезия",
"IQ": "Ирак",
"IR": "Иран, Ислямска република",
"IE": "Ирландия",
"IS": "Исландия",
"ES": "Испания",
"IT": "Италия",
"YE": "Йемен",
"JO": "Йордания",
"CV": "Кабо Верде",
"KZ": "Казахстан",
"KY": "Кайманови острови",
"KH": "Камбоджа",
"CM": "Камерун",
"CA": "Канада",
"QA": "Катар",
"KE": "Кения",
"CY": "Кипър",
"KG": "Киргизстан",
"KI": "Кирибати",
"CN": "Китай",
"CC": "Кокосови (Кийлинг) острови",
"CO": "Колумбия",
"KM": "Комори",
"CG": "Конго",
"KP": "Корея, Северна",
"KR": "Корея, Южна",
"CR": "Коста Рика",
"CU": "Куба",
"KW": "Кувейт",
"LV": "Латвия",
"LS": "Лесото",
"LR": "Либерия",
"LY": "Либийска арабска джамахирия",
"LB": "Ливан",
"LT": "Литва",
"LI": "Лихтенщайн",
"LU": "Люксембург",
"MR": "Мавритания",
"MU": "Мавриций",
"MG": "Мадагаскар",
"MO": "Макао О.А.Р. на Китай",
"MK": "Македония, Република",
"MW": "Малави",
"MY": "Малайзия",
"MV": "Малдиви",
"ML": "Мали",
"MT": "Малта",
"MA": "Мароко",
"MQ": "Мартиника",
"MH": "Маршалови острови",
"YT": "Мейот",
"MX": "Мексико",
"MM": "Мианмар",
"FM": "Микронезия, Обединени Щати",
"MZ": "Мозамбик",
"MD": "Молдова, Република",
"MC": "Монако",
"MN": "Монголия",
"MS": "Монсерат",
"NA": "Намибия",
"LA": "Народна демократична република Лаос",
"NR": "Науру",
"NP": "Непал",
"ZZ": "Непозната или несъществуваща област",
"NE": "Нигер",
"NG": "Нигерия",
"NI": "Никарагуа",
"NU": "Ниуе",
"NZ": "Нова Зеландия",
"NC": "Нова Каледония",
"NO": "Норвегия",
"AE": "Обединени арабски емирства",
"GB": "Обединено кралство",
"OM": "Оман",
"BV": "Остров Буве",
"CX": "Остров Кристмас",
"NF": "Остров Норфолк",
"HM": "Остров Хърд и Острови Макдоналд",
"CK": "Острови Кук",
"IM": "Острови Ман",
"TC": "Острови Туркс и Кайкос",
"PK": "Пакистан",
"PW": "Палау",
"PS": "Палестински територии",
"PA": "Панама",
"PG": "Папуа Нова Гвинея",
"PY": "Парагвай",
"PE": "Перу",
"PN": "Питкайрн",
"PL": "Полша",
"PT": "Португалия",
"PR": "Пуерто Рико",
"RE": "Реюниън",
"RW": "Руанда",
"RO": "Румъния",
"RU": "Руска федерация",
"US": "САЩ",
"UM": "САЩ - външни острови",
"VI": "САЩ, Вирджински острови",
"WS": "Самоа",
"SM": "Сан Марино",
"ST": "Сао Томе и Принципе",
"SA": "Саудитска Арабия",
"SJ": "Свалбард и Ян Майен",
"SH": "Света Елена",
"VA": "Свещено море (Ватиканска държава)",
"MP": "Северни Мариански Острови",
"BL": "Сейнт Бартоломей",
"VC": "Сейнт Винсънт и Гренадини",
"KN": "Сейнт Китс и Невис",
"LC": "Сейнт Лусия",
"MF": "Сейнт Мартин",
"SC": "Сейшели",
"PM": "Сен Пиер и Мигелон",
"SN": "Сенегал",
"SL": "Сиера Леоне",
"SG": "Сингапур",
"SY": "Сирийска арабска република",
"SK": "Словакия",
"SI": "Словения",
"SB": "Соломонови острови",
"SO": "Сомалия",
"SZ": "Суазиленд",
"SD": "Судан",
"SR": "Суринам",
"RS": "Сърбия",
"CS": "Сърбия и Черна гора",
"TJ": "Таджикистан",
"TW": "Тайван",
"TH": "Тайланд",
"TZ": "Танзания",
"TG": "Того",
"TK": "Токелау",
"TO": "Тонга",
"TT": "Тринидад и Тобаго",
"TV": "Тувалу",
"TN": "Тунис",
"TM": "Туркменистан",
"TR": "Турция",
"UG": "Уганда",
"UZ": "Узбекистан",
"UA": "Украйна",
"HU": "Унгария",
"WF": "Уолис и Футуна",
"UY": "Уругвай",
"FO": "Фарьорски острови",
"FJ": "Фиджи",
"PH": "Филипини",
"FI": "Финландия",
"FK": "Фолклендски острови",
"FR": "Франция",
"GF": "Френска Гвиана",
"PF": "Френска Полинезия",
"TF": "Френски южни територии",
"HT": "Хаити",
"NL": "Холандия",
"AN": "Холандски Антили",
"HK": "Хонг-Конг О.А.Р. на Китай",
"HN": "Хондурас",
"HR": "Хърватска",
"CF": "Централноафриканска Република",
"TD": "Чад",
"ME": "Черна гора",
"CZ": "Чешка република",
"CL": "Чили",
"CH": "Швейцария",
"SE": "Швеция",
"LK": "Шри Ланка",
"ZA": "Южна Африка",
"GS": "Южна Джорджия и Южни Сандвичеви Острови",
"JM": "Ямайка",
"JP": "Япония",
"GG": "о. Гърнзи",
"JE": "о. Джързи"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afganistan",
"AL": "Albània",
"DE": "Alemanya",
"DZ": "Algèria",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AG": "Antigua i Barbuda",
"AN": "Antilles Neerlandeses",
"AQ": "Antàrtida",
"AR": "Argentina",
"AM": "Armènia",
"AW": "Aruba",
"SA": "Aràbia Saudita",
"AU": "Austràlia",
"AZ": "Azerbaidjan",
"BS": "Bahames",
"BH": "Bahrain",
"BD": "Bangla Desh",
"BB": "Barbados",
"BZ": "Belize",
"BJ": "Benín",
"BM": "Bermudes",
"BT": "Bhutan",
"BY": "Bielorússia",
"BO": "Bolívia",
"BW": "Botswana",
"BR": "Brasil",
"BN": "Brunei",
"BG": "Bulgària",
"BF": "Burkina Faso",
"BI": "Burundi",
"BE": "Bèlgica",
"BA": "Bòsnia i Hercegovina",
"KH": "Cambodja",
"CM": "Camerun",
"CA": "Canadà",
"CV": "Cap Verd",
"CO": "Colòmbia",
"KM": "Comores",
"CG": "Congo",
"KP": "Corea del Nord",
"KR": "Corea del Sud",
"CR": "Costa Rica",
"CI": "Costa dIvori",
"HR": "Croàcia",
"CU": "Cuba",
"DK": "Dinamarca",
"DJ": "Djibouti",
"DM": "Dominica",
"EG": "Egipte",
"SV": "El Salvador",
"EC": "Equador",
"ER": "Eritrea",
"SK": "Eslovàquia",
"SI": "Eslovènia",
"ES": "Espanya",
"US": "Estats Units",
"EE": "Estònia",
"ET": "Etiòpia",
"FJ": "Fiji",
"PH": "Filipines",
"FI": "Finlàndia",
"FR": "França",
"GA": "Gabon",
"GE": "Geòrgia",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Grenada",
"GL": "Grenlàndia",
"GR": "Grècia",
"GP": "Guadeloupe",
"GF": "Guaiana Francesa",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea Bissau",
"GQ": "Guinea Equatorial",
"GY": "Guyana",
"GM": "Gàmbia",
"HT": "Haití",
"HN": "Hondures",
"HU": "Hongria",
"YE": "Iemen",
"BV": "Illa Bouvet",
"CX": "Illa Christmas",
"HM": "Illa Heard i Illes McDonald",
"NF": "Illa Norfolk",
"IM": "Illa de Man",
"RE": "Illa de la Reunió",
"KY": "Illes Caiman",
"CC": "Illes Cocos",
"CK": "Illes Cook",
"FO": "Illes Fèroe",
"GS": "Illes Geòrgia del Sud i Sandwich del Sud",
"FK": "Illes Malvines",
"MP": "Illes Mariannes del Nord",
"MH": "Illes Marshall",
"UM": "Illes Perifèriques Menors dels EUA",
"PN": "Illes Pitcairn",
"SB": "Illes Salomó",
"TC": "Illes Turks i Caicos",
"VG": "Illes Verges Britàniques",
"VI": "Illes Verges Nord-americanes",
"AX": "Illes Åland",
"ID": "Indonèsia",
"IR": "Iran",
"IQ": "Iraq",
"IE": "Irlanda",
"IS": "Islàndia",
"IL": "Israel",
"IT": "Itàlia",
"JM": "Jamaica",
"JP": "Japó",
"JE": "Jersey",
"JO": "Jordània",
"KZ": "Kazakhstan",
"KE": "Kenya",
"KG": "Kirguizistan",
"KI": "Kiribati",
"KW": "Kuwait",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Letònia",
"LR": "Libèria",
"LI": "Liechtenstein",
"LT": "Lituània",
"LU": "Luxemburg",
"LB": "Líban",
"LY": "Líbia",
"MK": "Macedònia",
"MG": "Madagascar",
"MW": "Malawi",
"MV": "Maldives",
"ML": "Mali",
"MT": "Malta",
"MY": "Malàisia",
"MA": "Marroc",
"MQ": "Martinica",
"MU": "Maurici",
"MR": "Mauritània",
"YT": "Mayotte",
"FM": "Micronèsia",
"MD": "Moldàvia",
"MN": "Mongòlia",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Moçambic",
"MM": "Myanmar",
"MX": "Mèxic",
"MC": "Mònaco",
"NA": "Namíbia",
"NR": "Nauru",
"NP": "Nepal",
"NI": "Nicaragua",
"NG": "Nigèria",
"NU": "Niue",
"NO": "Noruega",
"NC": "Nova Caledònia",
"NZ": "Nova Zelanda",
"NE": "Níger",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestina",
"PA": "Panamà",
"PG": "Papua Nova Guinea",
"PY": "Paraguai",
"NL": "Països Baixos",
"PE": "Perú",
"PF": "Polinèsia Francesa",
"PL": "Polònia",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"HK": "Regió administrativa especial xinesa de Hong Kong",
"MO": "Regió administrativa especial xinesa de Macau",
"ZZ": "Regió desconeguda o no vàlida",
"GB": "Regne Unit",
"CF": "República Centreafricana",
"CD": "República Democràtica del Congo",
"DO": "República Dominicana",
"CZ": "República Txeca",
"ZA": "República de Sud-àfrica",
"RO": "Romania",
"RW": "Rwanda",
"RU": "Rússia",
"BL": "Saint Barthélemy",
"KN": "Saint Christopher i Nevis",
"SH": "Saint Helena",
"LC": "Saint Lucia",
"MF": "Saint Martin",
"PM": "Saint Pierre i Miquelon",
"VC": "Saint Vincent i les Grenadines",
"WS": "Samoa",
"AS": "Samoa Americana",
"SM": "San Marino",
"SN": "Senegal",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapur",
"SO": "Somàlia",
"LK": "Sri Lanka",
"SD": "Sudan",
"SR": "Surinam",
"SE": "Suècia",
"CH": "Suïssa",
"SJ": "Svalbard i Jan Mayen",
"SZ": "Swazilàndia",
"EH": "Sàhara Occidental",
"ST": "São Tomé i Príncipe",
"RS": "Sèrbia",
"CS": "Sèrbia i Montenegro",
"SY": "Síria",
"TJ": "Tadjikistan",
"TH": "Tailàndia",
"TW": "Taiwan",
"TZ": "Tanzània",
"IO": "Territori Britànic de l'Oceà Índic",
"TF": "Territoris Francesos del Sud",
"TL": "Timor Oriental",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinitat i Tobago",
"TN": "Tunísia",
"TM": "Turkmenistan",
"TR": "Turquia",
"TV": "Tuvalu",
"TD": "Txad",
"UA": "Ucraïna",
"UG": "Uganda",
"AE": "Unió dels Emirats Àrabs",
"UY": "Uruguai",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VA": "Vaticà",
"VE": "Veneçuela",
"VN": "Vietnam",
"WF": "Wallis i Futuna",
"CL": "Xile",
"CN": "Xina",
"CY": "Xipre",
"ZW": "Zimbabwe",
"ZM": "Zàmbia",
"AT": "Àustria",
"IN": "Índia"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afghánistán",
"AX": "Alandy",
"AL": "Albánie",
"DZ": "Alžírsko",
"AS": "Americká Samoa",
"VI": "Americké Panenské ostrovy",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguila",
"AQ": "Antarktida",
"AG": "Antigua a Barbuda",
"AR": "Argentina",
"AM": "Arménie",
"AW": "Aruba",
"AU": "Austrálie",
"BS": "Bahamy",
"BH": "Bahrajn",
"BD": "Bangladéš",
"BB": "Barbados",
"BE": "Belgie",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermudy",
"BT": "Bhútán",
"BO": "Bolívie",
"BA": "Bosna a Hercegovina",
"BW": "Botswana",
"BR": "Brazílie",
"VG": "Britské Panenské ostrovy",
"IO": "Britské území v Indickém oceánu",
"BN": "Brunej Darussalam",
"BG": "Bulharsko",
"BF": "Burkina Faso",
"BI": "Burundi",
"BY": "Bělorusko",
"CL": "Chile",
"HR": "Chorvatsko",
"CK": "Cookovy ostrovy",
"CD": "Demokratická republika Kongo",
"DM": "Dominika",
"DO": "Dominikánská republika",
"DK": "Dánsko",
"DJ": "Džibuti",
"EG": "Egypt",
"EC": "Ekvádor",
"SV": "El Salvador",
"ER": "Eritrea",
"EE": "Estonsko",
"ET": "Etiopie",
"FO": "Faerské ostrovy",
"FK": "Falklandské ostrovy",
"FJ": "Fidži",
"PH": "Filipíny",
"FI": "Finsko",
"FR": "Francie",
"GF": "Francouzská Guyana",
"PF": "Francouzská Polynésie",
"TF": "Francouzská jižní teritoria",
"GA": "Gabon",
"GM": "Gambie",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Grenada",
"GE": "Gruzie",
"GL": "Grónsko",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HN": "Honduras",
"HK": "Hongkong, zvláštní administrativní oblast Číny",
"IN": "Indie",
"ID": "Indonésie",
"IE": "Irsko",
"IQ": "Irák",
"IS": "Island",
"IT": "Itálie",
"IL": "Izrael",
"JM": "Jamajka",
"JP": "Japonsko",
"YE": "Jemen",
"JE": "Jersey",
"ZA": "Jihoafrická republika",
"GS": "Jižní Georgie a Jižní Sandwichovy ostrovy",
"KR": "Jižní Korea",
"JO": "Jordánsko",
"KY": "Kajmanské ostrovy",
"KH": "Kambodža",
"CM": "Kamerun",
"CA": "Kanada",
"CV": "Kapverdy",
"QA": "Katar",
"KZ": "Kazachstán",
"KE": "Keňa",
"KI": "Kiribati",
"CC": "Kokosové ostrovy",
"CO": "Kolumbie",
"KM": "Komory",
"CG": "Kongo",
"CR": "Kostarika",
"CU": "Kuba",
"KW": "Kuvajt",
"CY": "Kypr",
"KG": "Kyrgyzstán",
"LS": "Lesotho",
"LB": "Libanon",
"LY": "Libye",
"LR": "Libérie",
"LI": "Lichtenštejnsko",
"LA": "Lidově demokratická republika Laos",
"LT": "Litva",
"LV": "Lotyšsko",
"LU": "Lucembursko",
"MK": "Macedonia",
"MG": "Madagaskar",
"MV": "Maladivy",
"MY": "Malajsie",
"MW": "Malawi",
"ML": "Mali",
"MT": "Malta",
"MA": "Maroko",
"MH": "Marshallovy ostrovy",
"MQ": "Martinik",
"MU": "Mauricius",
"MR": "Mauritánie",
"YT": "Mayotte",
"HU": "Maďarsko",
"UM": "Menší odlehlé ostrovy USA",
"MX": "Mexiko",
"FM": "Mikronézie",
"MD": "Moldavsko, republika",
"MC": "Monako",
"MN": "Mongolsko",
"MS": "Montserrat",
"MZ": "Mosambik",
"MM": "Myanmar",
"NA": "Namibie",
"NR": "Nauru",
"NP": "Nepál",
"ZZ": "Neznámá nebo neplatná oblast",
"NE": "Niger",
"NG": "Nigérie",
"NI": "Nikaragua",
"NU": "Niue",
"NL": "Nizozemsko",
"AN": "Nizozemské Antily",
"NF": "Norfolk",
"NO": "Norsko",
"NC": "Nová Kaledonie",
"NZ": "Nový Zéland",
"DE": "Německo",
"OM": "Omán",
"BV": "Ostrov Bouvet",
"IM": "Ostrov Man",
"TC": "Ostrovy Caicos a Turks",
"HM": "Ostrovy Heard a McDonald",
"PW": "Palau",
"PS": "Palestinian Territory",
"PA": "Panama",
"PG": "Papua-Nová Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PN": "Pitcairn",
"CI": "Pobřeží slonoviny",
"PL": "Polsko",
"PR": "Portoriko",
"PT": "Portugalsko",
"PK": "Pákistán",
"AT": "Rakousko",
"GQ": "Rovníková Guinea",
"RO": "Rumunsko",
"RU": "Rusko",
"RW": "Rwanda",
"RE": "Réunion",
"WS": "Samoa",
"SM": "San Marino",
"SA": "Saúdská Arábie",
"SN": "Senegal",
"KP": "Severní Korea",
"MP": "Severní Mariany",
"SC": "Seychely",
"SL": "Sierra Leone",
"SG": "Singapur",
"SK": "Slovensko",
"SI": "Slovinsko",
"SO": "Somálsko",
"AE": "Spojené arabské emiráty",
"US": "Spojené státy",
"RS": "Srbsko",
"CS": "Srbsko a Černá Hora",
"LK": "Srí Lanka",
"CF": "Středoafrická republika",
"SR": "Surinam",
"SJ": "Svalbard a Jan Mayen",
"SH": "Svatá Helena",
"LC": "Svatá Lucie",
"BL": "Svatý Bartoloměj",
"KN": "Svatý Kitts a Nevis",
"MF": "Svatý Martin",
"PM": "Svatý Pierre a Miquelon",
"ST": "Svatý Tomáš",
"VC": "Svatý Vincent a Grenadiny",
"VA": "Svatý stolec",
"SZ": "Svazijsko",
"SD": "Súdán",
"SY": "Sýrie",
"TZ": "Tanzanie",
"TW": "Tchaj-wan",
"TH": "Thajsko",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad a Tobago",
"TN": "Tunisko",
"TR": "Turecko",
"TM": "Turkmenistán",
"TV": "Tuvalu",
"TJ": "Tádžikistán",
"UG": "Uganda",
"UA": "Ukrajina",
"UY": "Uruguay",
"UZ": "Uzbekistán",
"VU": "Vanuatu",
"GB": "Velká Británie",
"VE": "Venezuela",
"VN": "Vietnam",
"CX": "Vánoční ostrovy",
"TL": "Východní Timor",
"WF": "Wallis a Futuna",
"ZM": "Zambie",
"ZW": "Zimbabwe",
"MO": "Zvláštní administrativní oblast Číny Macao",
"EH": "Západní Sahara",
"AZ": "Ázerbájdžán",
"IR": "Írán",
"TD": "Čad",
"ME": "Černá Hora",
"CZ": "Česká republika",
"CN": "Čína",
"GR": "Řecko",
"SB": "Šalamounovy ostrovy",
"ES": "Španělsko",
"SE": "Švédsko",
"CH": "Švýcarsko"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afghanistan",
"AX": "Alandinseln",
"AL": "Albanien",
"DZ": "Algerien",
"UM": "Amerikanisch-Ozeanien",
"AS": "Amerikanisch-Samoa",
"VI": "Amerikanische Jungferninseln",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarktis",
"AG": "Antigua und Barbuda",
"AR": "Argentinien",
"AM": "Armenien",
"AW": "Aruba",
"AZ": "Aserbaidschan",
"AU": "Australien",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesch",
"BB": "Barbados",
"BY": "Belarus",
"BE": "Belgien",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivien",
"BA": "Bosnien und Herzegowina",
"BW": "Botsuana",
"BV": "Bouvetinsel",
"BR": "Brasilien",
"VG": "Britische Jungferninseln",
"IO": "Britisches Territorium im Indischen Ozean",
"BN": "Brunei Darussalam",
"BG": "Bulgarien",
"BF": "Burkina Faso",
"BI": "Burundi",
"CL": "Chile",
"CN": "China",
"CK": "Cookinseln",
"CR": "Costa Rica",
"CI": "Côte dIvoire",
"CD": "Demokratische Republik Kongo",
"KP": "Demokratische Volksrepublik Korea",
"DE": "Deutschland",
"DM": "Dominica",
"DO": "Dominikanische Republik",
"DJ": "Dschibuti",
"DK": "Dänemark",
"EC": "Ecuador",
"SV": "El Salvador",
"ER": "Eritrea",
"EE": "Estland",
"FK": "Falklandinseln",
"FJ": "Fidschi",
"FI": "Finnland",
"FR": "Frankreich",
"GF": "Französisch-Guayana",
"PF": "Französisch-Polynesien",
"TF": "Französische Süd- und Antarktisgebiete",
"FO": "Färöer",
"GA": "Gabun",
"GM": "Gambia",
"GE": "Georgien",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Grenada",
"GR": "Griechenland",
"GL": "Grönland",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HM": "Heard- und McDonald-Inseln",
"HN": "Honduras",
"IN": "Indien",
"ID": "Indonesien",
"IQ": "Irak",
"IR": "Iran",
"IE": "Irland",
"IS": "Island",
"IM": "Isle of Man",
"IL": "Israel",
"IT": "Italien",
"JM": "Jamaika",
"JP": "Japan",
"YE": "Jemen",
"JE": "Jersey",
"JO": "Jordanien",
"KY": "Kaimaninseln",
"KH": "Kambodscha",
"CM": "Kamerun",
"CA": "Kanada",
"CV": "Kap Verde",
"KZ": "Kasachstan",
"QA": "Katar",
"KE": "Kenia",
"KG": "Kirgisistan",
"KI": "Kiribati",
"CC": "Kokosinseln",
"CO": "Kolumbien",
"KM": "Komoren",
"CG": "Kongo",
"HR": "Kroatien",
"CU": "Kuba",
"KW": "Kuwait",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Lettland",
"LB": "Libanon",
"LR": "Liberia",
"LY": "Libyen",
"LI": "Liechtenstein",
"LT": "Litauen",
"LU": "Luxemburg",
"MG": "Madagaskar",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Malediven",
"ML": "Mali",
"MT": "Malta",
"MA": "Marokko",
"MH": "Marshallinseln",
"MQ": "Martinique",
"MR": "Mauretanien",
"MU": "Mauritius",
"YT": "Mayotte",
"MK": "Mazedonien",
"MX": "Mexiko",
"FM": "Mikronesien",
"MC": "Monaco",
"MN": "Mongolei",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Mosambik",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NC": "Neukaledonien",
"NZ": "Neuseeland",
"NI": "Nicaragua",
"NL": "Niederlande",
"AN": "Niederländische Antillen",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"NF": "Norfolkinsel",
"NO": "Norwegen",
"MP": "Nördliche Marianen",
"OM": "Oman",
"TL": "Osttimor",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palästinensische Gebiete",
"PA": "Panama",
"PG": "Papua-Neuguinea",
"PY": "Paraguay",
"PE": "Peru",
"PH": "Philippinen",
"PN": "Pitcairn",
"PL": "Polen",
"PT": "Portugal",
"PR": "Puerto Rico",
"KR": "Republik Korea",
"MD": "Republik Moldau",
"RW": "Ruanda",
"RO": "Rumänien",
"RU": "Russische Föderation",
"RE": "Réunion",
"SB": "Salomonen",
"ZM": "Sambia",
"WS": "Samoa",
"SM": "San Marino",
"SA": "Saudi-Arabien",
"SE": "Schweden",
"CH": "Schweiz",
"SN": "Senegal",
"RS": "Serbien",
"CS": "Serbien und Montenegro",
"SC": "Seychellen",
"SL": "Sierra Leone",
"ZW": "Simbabwe",
"SG": "Singapur",
"SK": "Slowakei",
"SI": "Slowenien",
"SO": "Somalia",
"HK": "Sonderverwaltungszone Hongkong",
"MO": "Sonderverwaltungszone Macao",
"ES": "Spanien",
"LK": "Sri Lanka",
"BL": "St. Barthélemy",
"SH": "St. Helena",
"KN": "St. Kitts und Nevis",
"LC": "St. Lucia",
"MF": "St. Martin",
"PM": "St. Pierre und Miquelon",
"VC": "St. Vincent und die Grenadinen",
"SD": "Sudan",
"SR": "Suriname",
"SJ": "Svalbard und Jan Mayen",
"SZ": "Swasiland",
"SY": "Syrien",
"ST": "São Tomé und Príncipe",
"ZA": "Südafrika",
"GS": "Südgeorgien und die Südlichen Sandwichinseln",
"TJ": "Tadschikistan",
"TW": "Taiwan",
"TZ": "Tansania",
"TH": "Thailand",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad und Tobago",
"TD": "Tschad",
"CZ": "Tschechische Republik",
"TN": "Tunesien",
"TM": "Turkmenistan",
"TC": "Turks- und Caicosinseln",
"TV": "Tuvalu",
"TR": "Türkei",
"UG": "Uganda",
"UA": "Ukraine",
"ZZ": "Unbekannte oder ungültige Region",
"HU": "Ungarn",
"UY": "Uruguay",
"UZ": "Usbekistan",
"VU": "Vanuatu",
"VA": "Vatikanstadt",
"VE": "Venezuela",
"AE": "Vereinigte Arabische Emirate",
"US": "Vereinigte Staaten",
"GB": "Vereinigtes Königreich",
"VN": "Vietnam",
"WF": "Wallis und Futuna",
"CX": "Weihnachtsinsel",
"EH": "Westsahara",
"CF": "Zentralafrikanische Republik",
"CY": "Zypern",
"EG": "Ägypten",
"GQ": "Äquatorialguinea",
"ET": "Äthiopien",
"AT": "Österreich"
}

View File

@ -0,0 +1,251 @@
{
"AF": "Afghanistan",
"AX": "Åland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
"AG": "Antigua And Barbuda",
"AR": "Argentina",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaijan",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesh",
"BB": "Barbados",
"BY": "Belarus",
"BE": "Belgium",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivia, Plurinational State Of",
"BQ": "Bonaire, Sint Eustatius And Saba",
"BA": "Bosnia And Herzegovina",
"BW": "Botswana",
"BV": "Bouvet Island",
"BR": "Brazil",
"IO": "British Indian Ocean Territory",
"BN": "Brunei Darussalam",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"CV": "Cabo Verde",
"KH": "Cambodia",
"CM": "Cameroon",
"CA": "Canada",
"KY": "Cayman Islands",
"CF": "Central African Republic",
"TD": "Chad",
"CL": "Chile",
"CN": "China",
"CX": "Christmas Island",
"CC": "Cocos (Keeling) Islands",
"CO": "Colombia",
"KM": "Comoros",
"CG": "Congo",
"CD": "Congo, The Democratic Republic Of The",
"CK": "Cook Islands",
"CR": "Costa Rica",
"CI": "Côte d'Ivoire",
"HR": "Croatia",
"CU": "Cuba",
"CW": "Curaçao",
"CY": "Cyprus",
"CZ": "Czechia",
"DK": "Denmark",
"DJ": "Djibouti",
"DM": "Dominica",
"DO": "Dominican Republic",
"EC": "Ecuador",
"EG": "Egypt",
"SV": "El Salvador",
"GQ": "Equatorial Guinea",
"ER": "Eritrea",
"EE": "Estonia",
"ET": "Ethiopia",
"FK": "Falkland Islands (Malvinas)",
"FO": "Faroe Islands",
"FJ": "Fiji",
"FI": "Finland",
"FR": "France",
"GF": "French Guiana",
"PF": "French Polynesia",
"TF": "French Southern Territories",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgia",
"DE": "Germany",
"GH": "Ghana",
"GI": "Gibraltar",
"GR": "Greece",
"GL": "Greenland",
"GD": "Grenada",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HM": "Heard Island And Mcdonald Islands",
"VA": "Holy See (Vatican City State)",
"HN": "Honduras",
"HK": "Hong Kong",
"HU": "Hungary",
"IS": "Iceland",
"IN": "India",
"ID": "Indonesia",
"IR": "Iran, Islamic Republic Of",
"IQ": "Iraq",
"IE": "Ireland",
"IM": "Isle Of Man",
"IL": "Israel",
"IT": "Italy",
"JM": "Jamaica",
"JP": "Japan",
"JE": "Jersey",
"JO": "Jordan",
"KZ": "Kazakhstan",
"KE": "Kenya",
"KI": "Kiribati",
"KP": "Korea, Democratic People's Republic Of",
"KR": "Korea, Republic Of",
"KW": "Kuwait",
"KG": "Kyrgyzstan",
"LA": "Lao People's Democratic Republic",
"LV": "Latvia",
"LB": "Lebanon",
"LS": "Lesotho",
"LR": "Liberia",
"LY": "Libya",
"LI": "Liechtenstein",
"LT": "Lithuania",
"LU": "Luxembourg",
"MO": "Macao",
"MK": "Macedonia, The Former Yugoslav Republic Of",
"MG": "Madagascar",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Maldives",
"ML": "Mali",
"MT": "Malta",
"MH": "Marshall Islands",
"MQ": "Martinique",
"MR": "Mauritania",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Mexico",
"FM": "Micronesia, Federated States Of",
"MD": "Moldova, Republic Of",
"MC": "Monaco",
"MN": "Mongolia",
"ME": "Montenegro",
"MS": "Montserrat",
"MA": "Morocco",
"MZ": "Mozambique",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NL": "Netherlands",
"NC": "New Caledonia",
"NZ": "New Zealand",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"NF": "Norfolk Island",
"MP": "Northern Mariana Islands",
"NO": "Norway",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestine, State Of",
"PA": "Panama",
"PG": "Papua New Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PH": "Philippines",
"PN": "Pitcairn",
"PL": "Poland",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"RE": "Réunion",
"RO": "Romania",
"RU": "Russian Federation",
"RW": "Rwanda",
"BL": "Saint Barthélemy",
"SH": "Saint Helena, Ascension And Tristan Da Cunha",
"KN": "Saint Kitts And Nevis",
"LC": "Saint Lucia",
"MF": "Saint Martin (French Part)",
"PM": "Saint Pierre And Miquelon",
"VC": "Saint Vincent And The Grenadines",
"WS": "Samoa",
"SM": "San Marino",
"ST": "Sao Tome And Principe",
"SA": "Saudi Arabia",
"SN": "Senegal",
"RS": "Serbia",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapore",
"SX": "Sint Maarten (Dutch Part)",
"SK": "Slovakia",
"SI": "Slovenia",
"SB": "Solomon Islands",
"SO": "Somalia",
"ZA": "South Africa",
"GS": "South Georgia And The South Sandwich Islands",
"SS": "South Sudan",
"ES": "Spain",
"LK": "Sri Lanka",
"SD": "Sudan",
"SR": "Suriname",
"SJ": "Svalbard And Jan Mayen",
"SZ": "Swaziland",
"SE": "Sweden",
"CH": "Switzerland",
"SY": "Syrian Arab Republic",
"TW": "Taiwan",
"TJ": "Tajikistan",
"TZ": "Tanzania, United Republic Of",
"TH": "Thailand",
"TL": "Timor-Leste",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad And Tobago",
"TN": "Tunisia",
"TR": "Turkey",
"TM": "Turkmenistan",
"TC": "Turks And Caicos Islands",
"TV": "Tuvalu",
"UG": "Uganda",
"UA": "Ukraine",
"AE": "United Arab Emirates",
"GB": "United Kingdom",
"US": "United States",
"UM": "United States Minor Outlying Islands",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VE": "Venezuela, Bolivarian Republic Of",
"VN": "Viet Nam",
"VG": "Virgin Islands, British",
"VI": "Virgin Islands, U.S.",
"WF": "Wallis And Futuna",
"EH": "Western Sahara",
"YE": "Yemen",
"ZM": "Zambia",
"ZW": "Zimbabwe"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afganistán",
"AL": "Albania",
"DE": "Alemania",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguila",
"AG": "Antigua y Barbuda",
"AN": "Antillas Neerlandesas",
"AQ": "Antártida",
"SA": "Arabia Saudí",
"DZ": "Argelia",
"AR": "Argentina",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaiyán",
"BS": "Bahamas",
"BH": "Bahréin",
"BD": "Bangladesh",
"BB": "Barbados",
"BZ": "Belice",
"BJ": "Benín",
"BM": "Bermudas",
"BY": "Bielorrusia",
"BO": "Bolivia",
"BA": "Bosnia-Herzegovina",
"BW": "Botsuana",
"BR": "Brasil",
"BN": "Brunéi",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"BT": "Bután",
"BE": "Bélgica",
"CV": "Cabo Verde",
"KH": "Camboya",
"CM": "Camerún",
"CA": "Canadá",
"TD": "Chad",
"CL": "Chile",
"CN": "China",
"CY": "Chipre",
"VA": "Ciudad del Vaticano",
"CO": "Colombia",
"KM": "Comoras",
"CG": "Congo",
"KP": "Corea del Norte",
"KR": "Corea del Sur",
"CR": "Costa Rica",
"CI": "Costa de Marfil",
"HR": "Croacia",
"CU": "Cuba",
"DK": "Dinamarca",
"DM": "Dominica",
"EC": "Ecuador",
"EG": "Egipto",
"SV": "El Salvador",
"AE": "Emiratos Árabes Unidos",
"ER": "Eritrea",
"SK": "Eslovaquia",
"SI": "Eslovenia",
"ES": "España",
"US": "Estados Unidos",
"EE": "Estonia",
"ET": "Etiopía",
"PH": "Filipinas",
"FI": "Finlandia",
"FJ": "Fiyi",
"FR": "Francia",
"GA": "Gabón",
"GM": "Gambia",
"GE": "Georgia",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Granada",
"GR": "Grecia",
"GL": "Groenlandia",
"GP": "Guadalupe",
"GU": "Guam",
"GT": "Guatemala",
"GF": "Guayana Francesa",
"GG": "Guernsey",
"GN": "Guinea",
"GQ": "Guinea Ecuatorial",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haití",
"HN": "Honduras",
"HU": "Hungría",
"IN": "India",
"ID": "Indonesia",
"IQ": "Iraq",
"IE": "Irlanda",
"IR": "Irán",
"BV": "Isla Bouvet",
"CX": "Isla Christmas",
"NU": "Isla Niue",
"NF": "Isla Norfolk",
"IM": "Isla de Man",
"IS": "Islandia",
"KY": "Islas Caimán",
"CC": "Islas Cocos",
"CK": "Islas Cook",
"FO": "Islas Feroe",
"GS": "Islas Georgia del Sur y Sandwich del Sur",
"HM": "Islas Heard y McDonald",
"FK": "Islas Malvinas",
"MP": "Islas Marianas del Norte",
"MH": "Islas Marshall",
"SB": "Islas Salomón",
"TC": "Islas Turcas y Caicos",
"VG": "Islas Vírgenes Británicas",
"VI": "Islas Vírgenes de los Estados Unidos",
"UM": "Islas menores alejadas de los Estados Unidos",
"AX": "Islas Åland",
"IL": "Israel",
"IT": "Italia",
"JM": "Jamaica",
"JP": "Japón",
"JE": "Jersey",
"JO": "Jordania",
"KZ": "Kazajistán",
"KE": "Kenia",
"KG": "Kirguistán",
"KI": "Kiribati",
"KW": "Kuwait",
"LA": "Laos",
"LS": "Lesoto",
"LV": "Letonia",
"LR": "Liberia",
"LY": "Libia",
"LI": "Liechtenstein",
"LT": "Lituania",
"LU": "Luxemburgo",
"LB": "Líbano",
"MK": "Macedonia",
"MG": "Madagascar",
"MY": "Malasia",
"MW": "Malaui",
"MV": "Maldivas",
"ML": "Mali",
"MT": "Malta",
"MA": "Marruecos",
"MQ": "Martinica",
"MU": "Mauricio",
"MR": "Mauritania",
"YT": "Mayotte",
"FM": "Micronesia",
"MD": "Moldavia",
"MN": "Mongolia",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Mozambique",
"MM": "Myanmar",
"MX": "México",
"MC": "Mónaco",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NI": "Nicaragua",
"NG": "Nigeria",
"NO": "Noruega",
"NC": "Nueva Caledonia",
"NZ": "Nueva Zelanda",
"NE": "Níger",
"OM": "Omán",
"PK": "Pakistán",
"PW": "Palau",
"PS": "Palestina",
"PA": "Panamá",
"PG": "Papúa Nueva Guinea",
"PY": "Paraguay",
"NL": "Países Bajos",
"PE": "Perú",
"PN": "Pitcairn",
"PF": "Polinesia Francesa",
"PL": "Polonia",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"HK": "Región Administrativa Especial de Hong Kong de la República Popular China",
"MO": "Región Administrativa Especial de Macao de la República Popular China",
"ZZ": "Región desconocida o no válida",
"GB": "Reino Unido",
"CF": "República Centroafricana",
"CZ": "República Checa",
"CD": "República Democrática del Congo",
"DO": "República Dominicana",
"RE": "Reunión",
"RW": "Ruanda",
"RO": "Rumanía",
"RU": "Rusia",
"WS": "Samoa",
"AS": "Samoa Americana",
"BL": "San Bartolomé",
"KN": "San Cristóbal y Nieves",
"SM": "San Marino",
"MF": "San Martín",
"PM": "San Pedro y Miquelón",
"VC": "San Vicente y las Granadinas",
"SH": "Santa Elena",
"LC": "Santa Lucía",
"ST": "Santo Tomé y Príncipe",
"SN": "Senegal",
"RS": "Serbia",
"CS": "Serbia y Montenegro",
"SC": "Seychelles",
"SL": "Sierra Leona",
"SG": "Singapur",
"SY": "Siria",
"SO": "Somalia",
"LK": "Sri Lanka",
"SZ": "Suazilandia",
"ZA": "Sudáfrica",
"SD": "Sudán",
"SE": "Suecia",
"CH": "Suiza",
"SR": "Surinam",
"SJ": "Svalbard y Jan Mayen",
"EH": "Sáhara Occidental",
"TH": "Tailandia",
"TW": "Taiwán",
"TZ": "Tanzania",
"TJ": "Tayikistán",
"IO": "Territorio Británico del Océano Índico",
"TF": "Territorios Australes Franceses",
"TL": "Timor Oriental",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad y Tobago",
"TM": "Turkmenistán",
"TR": "Turquía",
"TV": "Tuvalu",
"TN": "Túnez",
"UA": "Ucrania",
"UG": "Uganda",
"UY": "Uruguay",
"UZ": "Uzbekistán",
"VU": "Vanuatu",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis y Futuna",
"YE": "Yemen",
"DJ": "Yibuti",
"ZM": "Zambia",
"ZW": "Zimbabue"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afganistán",
"AL": "Albania",
"DE": "Alemania",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguila",
"AG": "Antigua y Barbuda",
"AN": "Antillas Neerlandesas",
"AQ": "Antártida",
"SA": "Arabia Saudí",
"DZ": "Argelia",
"AR": "Argentina",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaiyán",
"BS": "Bahamas",
"BH": "Bahréin",
"BD": "Bangladesh",
"BB": "Barbados",
"BZ": "Belice",
"BJ": "Benín",
"BM": "Bermudas",
"BY": "Bielorrusia",
"BO": "Bolivia",
"BA": "Bosnia-Herzegovina",
"BW": "Botsuana",
"BR": "Brasil",
"BN": "Brunéi",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"BT": "Bután",
"BE": "Bélgica",
"CV": "Cabo Verde",
"KH": "Camboya",
"CM": "Camerún",
"CA": "Canadá",
"TD": "Chad",
"CL": "Chile",
"CN": "China",
"CY": "Chipre",
"VA": "Ciudad del Vaticano",
"CO": "Colombia",
"KM": "Comoras",
"CG": "Congo",
"KP": "Corea del Norte",
"KR": "Corea del Sur",
"CR": "Costa Rica",
"CI": "Costa de Marfil",
"HR": "Croacia",
"CU": "Cuba",
"DK": "Dinamarca",
"DM": "Dominica",
"EC": "Ecuador",
"EG": "Egipto",
"SV": "El Salvador",
"AE": "Emiratos Árabes Unidos",
"ER": "Eritrea",
"SK": "Eslovaquia",
"SI": "Eslovenia",
"ES": "España",
"US": "Estados Unidos",
"EE": "Estonia",
"ET": "Etiopía",
"PH": "Filipinas",
"FI": "Finlandia",
"FJ": "Fiyi",
"FR": "Francia",
"GA": "Gabón",
"GM": "Gambia",
"GE": "Georgia",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Granada",
"GR": "Grecia",
"GL": "Groenlandia",
"GP": "Guadalupe",
"GU": "Guam",
"GT": "Guatemala",
"GF": "Guayana Francesa",
"GG": "Guernsey",
"GN": "Guinea",
"GQ": "Guinea Ecuatorial",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haití",
"HN": "Honduras",
"HU": "Hungría",
"IN": "India",
"ID": "Indonesia",
"IQ": "Iraq",
"IE": "Irlanda",
"IR": "Irán",
"BV": "Isla Bouvet",
"CX": "Isla Christmas",
"NU": "Isla Niue",
"NF": "Isla Norfolk",
"IM": "Isla de Man",
"IS": "Islandia",
"KY": "Islas Caimán",
"CC": "Islas Cocos",
"CK": "Islas Cook",
"FO": "Islas Feroe",
"GS": "Islas Georgia del Sur y Sandwich del Sur",
"HM": "Islas Heard y McDonald",
"FK": "Islas Malvinas",
"MP": "Islas Marianas del Norte",
"MH": "Islas Marshall",
"SB": "Islas Salomón",
"TC": "Islas Turcas y Caicos",
"VG": "Islas Vírgenes Británicas",
"VI": "Islas Vírgenes de los Estados Unidos",
"UM": "Islas menores alejadas de los Estados Unidos",
"AX": "Islas Åland",
"IL": "Israel",
"IT": "Italia",
"JM": "Jamaica",
"JP": "Japón",
"JE": "Jersey",
"JO": "Jordania",
"KZ": "Kazajistán",
"KE": "Kenia",
"KG": "Kirguistán",
"KI": "Kiribati",
"KW": "Kuwait",
"LA": "Laos",
"LS": "Lesoto",
"LV": "Letonia",
"LR": "Liberia",
"LY": "Libia",
"LI": "Liechtenstein",
"LT": "Lituania",
"LU": "Luxemburgo",
"LB": "Líbano",
"MK": "Macedonia",
"MG": "Madagascar",
"MY": "Malasia",
"MW": "Malaui",
"MV": "Maldivas",
"ML": "Mali",
"MT": "Malta",
"MA": "Marruecos",
"MQ": "Martinica",
"MU": "Mauricio",
"MR": "Mauritania",
"YT": "Mayotte",
"FM": "Micronesia",
"MD": "Moldavia",
"MN": "Mongolia",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Mozambique",
"MM": "Myanmar",
"MX": "México",
"MC": "Mónaco",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NI": "Nicaragua",
"NG": "Nigeria",
"NO": "Noruega",
"NC": "Nueva Caledonia",
"NZ": "Nueva Zelanda",
"NE": "Níger",
"OM": "Omán",
"PK": "Pakistán",
"PW": "Palau",
"PS": "Palestina",
"PA": "Panamá",
"PG": "Papúa Nueva Guinea",
"PY": "Paraguay",
"NL": "Países Bajos",
"PE": "Perú",
"PN": "Pitcairn",
"PF": "Polinesia Francesa",
"PL": "Polonia",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"HK": "Región Administrativa Especial de Hong Kong de la República Popular China",
"MO": "Región Administrativa Especial de Macao de la República Popular China",
"ZZ": "Región desconocida o no válida",
"GB": "Reino Unido",
"CF": "República Centroafricana",
"CZ": "República Checa",
"CD": "República Democrática del Congo",
"DO": "República Dominicana",
"RE": "Reunión",
"RW": "Ruanda",
"RO": "Rumanía",
"RU": "Rusia",
"WS": "Samoa",
"AS": "Samoa Americana",
"BL": "San Bartolomé",
"KN": "San Cristóbal y Nieves",
"SM": "San Marino",
"MF": "San Martín",
"PM": "San Pedro y Miquelón",
"VC": "San Vicente y las Granadinas",
"SH": "Santa Elena",
"LC": "Santa Lucía",
"ST": "Santo Tomé y Príncipe",
"SN": "Senegal",
"RS": "Serbia",
"CS": "Serbia y Montenegro",
"SC": "Seychelles",
"SL": "Sierra Leona",
"SG": "Singapur",
"SY": "Siria",
"SO": "Somalia",
"LK": "Sri Lanka",
"SZ": "Suazilandia",
"ZA": "Sudáfrica",
"SD": "Sudán",
"SE": "Suecia",
"CH": "Suiza",
"SR": "Surinam",
"SJ": "Svalbard y Jan Mayen",
"EH": "Sáhara Occidental",
"TH": "Tailandia",
"TW": "Taiwán",
"TZ": "Tanzania",
"TJ": "Tayikistán",
"IO": "Territorio Británico del Océano Índico",
"TF": "Territorios Australes Franceses",
"TL": "Timor Oriental",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad y Tobago",
"TM": "Turkmenistán",
"TR": "Turquía",
"TV": "Tuvalu",
"TN": "Túnez",
"UA": "Ucrania",
"UG": "Uganda",
"UY": "Uruguay",
"UZ": "Uzbekistán",
"VU": "Vanuatu",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis y Futuna",
"YE": "Yemen",
"DJ": "Yibuti",
"ZM": "Zambia",
"ZW": "Zimbabue"
}

View File

@ -0,0 +1,217 @@
{
"AF": "Afganistan",
"CF": "Afrika Erdiko Errepublika",
"AX": "Aland Uharteak",
"AL": "Albania",
"DE": "Alemania",
"DZ": "Aljeria",
"AS": "Amerikar Samoa",
"US": "Ameriketako Estatu Batuak",
"AO": "Angola",
"AQ": "Antartika",
"AG": "Antigua eta Barbuda",
"AE": "Arabiar Emirrerri Batuak",
"AR": "Argentina",
"AM": "Armenia",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaijan",
"BS": "Bahamak",
"BD": "Bangladesh",
"BE": "Belgika",
"BJ": "Benin",
"BT": "Bhutan",
"BY": "Bielorrusia",
"VI": "Birjina uharte amerikarrak",
"VG": "Birjina uharte britainiarrak",
"MM": "Birmania",
"CI": "Boli Kosta",
"BO": "Bolibia",
"BA": "Bosnia-Herzegovina",
"BW": "Botswana",
"BV": "Bouvet Uhartea",
"BR": "Brasil",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"CV": "Cabo Verde",
"CX": "Christmas uhartea",
"CC": "Cocos uharteak",
"CK": "Cook uharteak",
"DK": "Danimarka",
"DJ": "Djibuti",
"DM": "Dominika",
"DO": "Dominikar Errepublika",
"EG": "Egipto",
"TL": "Ekialdeko Timor",
"EC": "Ekuador",
"GQ": "Ekuatore Ginea",
"ER": "Eritrea",
"GB": "Erresuma Batua",
"RO": "Errumania",
"RU": "Errusia",
"SK": "Eslovakia",
"SI": "Eslovenia",
"ES": "Espainia",
"UM": "Estatu Batuetatik urruti dauden uharte txikiak",
"EE": "Estonia",
"ET": "Etiopia",
"FO": "Faroe Uharteak",
"PH": "Filipinak",
"FI": "Finlandia",
"FR": "Frantzia",
"TF": "Frantziaren Lurralde Australak",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgia",
"GH": "Ghana",
"GN": "Ginea",
"GW": "Ginea-Bissau",
"GR": "Grezia",
"GL": "Groenlandia",
"GG": "Guernsey",
"GF": "Guyana Frantsesa",
"HT": "Haiti",
"HM": "Heard eta McDonald Uharteak",
"KR": "Hego Korea",
"ZA": "Hegoafrika",
"GS": "Hegoaldeko Georgia eta Hegoaldeko Sandwich uharteak",
"NL": "Herbehereak",
"AN": "Holandarren Antillak",
"HN": "Honduras",
"HU": "Hungaria",
"IN": "India",
"IO": "Indiako Ozeanoko Britainiar Lurraldea",
"ID": "Indonesia",
"KP": "Ipar Korea",
"MP": "Iparraldeko Mariana uharteak",
"IQ": "Irak",
"IR": "Iran",
"IE": "Irlanda",
"IS": "Islandia",
"IL": "Israel",
"IT": "Italia",
"JM": "Jamaika",
"JP": "Japonia",
"JE": "Jersey",
"JO": "Jordania",
"KY": "Kaiman Uharteak",
"NC": "Kaledonia Berria",
"CM": "Kamerun",
"CA": "Kanada",
"KH": "Kanbodia",
"QA": "Katar",
"KZ": "Kazakhstan",
"KE": "Kenia",
"KG": "Kirgizistan",
"KI": "Kiribati",
"CO": "Kolonbia",
"KM": "Komoreak",
"CG": "Kongo",
"CD": "Kongoko Errepublika Demokratikoa",
"HR": "Kroazia",
"CU": "Kuba",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Letonia",
"LB": "Libano",
"LR": "Liberia",
"LY": "Libia",
"LI": "Liechtenstein",
"LT": "Lituania",
"LU": "Luxenburgo",
"MG": "Madagaskar",
"MO": "Makau",
"MY": "Malasia",
"MW": "Malawi",
"MV": "Maldivak",
"ML": "Mali",
"FK": "Malvinak",
"IM": "Man uhartea",
"MA": "Maroko",
"MH": "Marshall uharteak",
"MR": "Mauritania",
"MU": "Maurizio",
"MK": "Mazedonia",
"EH": "Mendebaldeko Sahara",
"MX": "Mexiko",
"FM": "Mikronesia",
"MD": "Moldavia",
"MC": "Monako",
"MN": "Mongolia",
"ME": "Montenegro",
"MZ": "Mozambike",
"NA": "Namibia",
"NP": "Nepal",
"NE": "Niger",
"NG": "Nigeria",
"NI": "Nikaragua",
"NF": "Norfolk uhartea",
"NO": "Norvegia",
"OM": "Oman",
"PK": "Pakistan",
"PS": "Palestina",
"PG": "Papua Ginea Berria",
"PY": "Paraguai",
"PE": "Peru",
"PF": "Polinesia Frantsesa",
"PL": "Polonia",
"PT": "Portugal",
"RW": "Ruanda",
"SH": "Saint Helena",
"KN": "Saint Kitts eta Nevis",
"VC": "Saint Vincent eta Grenadinak",
"PM": "Saint-Pierre eta Mikelune",
"SB": "Salomon uharteak",
"WS": "Samoa",
"SM": "San Marino",
"LC": "Santa Luzia",
"ST": "Sao Tomé eta Principe",
"SA": "Saudi Arabia",
"SN": "Senegal",
"RS": "Serbia",
"CS": "Serbia eta Montenegro",
"SC": "Seychelleak",
"SL": "Sierra Leona",
"SG": "Singapur",
"SY": "Siria",
"SO": "Somalia",
"LK": "Sri Lanka",
"SD": "Sudan",
"SE": "Suedia",
"CH": "Suitza",
"SR": "Surinam",
"SJ": "Svalbard eta Jan Mayen uharteak",
"SZ": "Swazilandia",
"TJ": "Tadjikistan",
"TH": "Tailandia",
"TW": "Taiwan",
"TZ": "Tanzania",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad eta Tobago",
"TN": "Tunisia",
"TC": "Turk eta Caico uharteak",
"TR": "Turkia",
"TM": "Turkmenistan",
"TV": "Tuvalu",
"TD": "Txad",
"CZ": "Txekiar errepublika",
"CL": "Txile",
"CN": "Txina",
"UG": "Uganda",
"UA": "Ukraina",
"UY": "Uruguai",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VA": "Vatikano",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis eta Futuna",
"YE": "Yemen",
"ZM": "Zambia",
"NZ": "Zeelanda Berria",
"ZW": "Zimbabwe",
"CY": "Zipre"
}

View File

@ -0,0 +1,250 @@
{
"AW": "آروبا",
"AR": "آرژانتین",
"AL": "آلبانی",
"DE": "آلمان",
"AN": "آنتیل هلند",
"AG": "آنتیگوا و باربودا",
"AD": "آندورا",
"AO": "آنگولا",
"AI": "آنگیل",
"AT": "اتریش",
"ET": "اتیوپی",
"JO": "اردن",
"AM": "ارمنستان",
"ER": "اریتره",
"UZ": "ازبکستان",
"AU": "استرالیا",
"EE": "استونی",
"IL": "اسرائیل",
"SK": "اسلواکی",
"SI": "اسلوونی",
"SJ": "اسوالبارد و جان ماین",
"ES": "اسپانیا",
"ZA": "افریقای جنوبی",
"AF": "افغانستان",
"DZ": "الجزایر",
"SV": "السالوادور",
"AE": "امارات متحدهٔ عربی",
"ID": "اندونزی",
"UY": "اوروگوئه",
"UA": "اوکراین",
"UG": "اوگاندا",
"EC": "اکوادر",
"US": "ایالات متحدهٔ امریکا",
"IT": "ایتالیا",
"IR": "ایران",
"IE": "ایرلند",
"IS": "ایسلند",
"BB": "باربادوس",
"BS": "باهاما",
"BH": "بحرین",
"BR": "برزیل",
"BM": "برمودا",
"BN": "برونئی",
"GB": "بریتانیا",
"BG": "بلغارستان",
"BE": "بلژیک",
"BZ": "بلیز",
"BD": "بنگلادش",
"BJ": "بنین",
"BT": "بوتان",
"BW": "بوتسوانا",
"BI": "بوروندی",
"BF": "بورکینافاسو",
"BA": "بوسنی و هرزگوین",
"BO": "بولیوی",
"BY": "بیلوروسی",
"TJ": "تاجیکستان",
"TZ": "تانزانیا",
"TH": "تایلند",
"TW": "تایوان",
"TM": "ترکمنستان",
"TR": "ترکیه",
"TT": "ترینیداد و توباگو",
"TN": "تونس",
"TO": "تونگا",
"TV": "تووالو",
"TK": "توکلائو",
"TG": "توگو",
"TL": "تیمور شرقی",
"JM": "جامائیکا",
"GI": "جبل‌الطارق",
"JE": "جرسی",
"AX": "جزایر آلاند",
"TC": "جزایر ترک و کایکوس",
"SB": "جزایر سلیمان",
"FO": "جزایر فارو",
"FK": "جزایر فالکلند",
"MH": "جزایر مارشال",
"MP": "جزایر ماریانای شمالی",
"VI": "جزایر ویرجین ایالات متحده",
"VG": "جزایر ویرجین بریتانیا",
"UM": "جزایر کوچک دورافتادهٔ ایالات متحده",
"CK": "جزایر کوک",
"CC": "جزایر کوکوس",
"KY": "جزایر کِیمن",
"BV": "جزیرهٔ بووت",
"IM": "جزیرهٔ مان",
"NF": "جزیرهٔ نورفولک",
"HM": "جزیرهٔ هرد و جزایر مک‌دونالد",
"CX": "جزیرهٔ کریسمس",
"AZ": "جمهوری آذربایجان",
"CF": "جمهوری افریقای مرکزی",
"DO": "جمهوری دومینیکن",
"CZ": "جمهوری چک",
"AQ": "جنوبگان",
"GS": "جورجیای جنوبی و جزایر ساندویچ جنوبی",
"DJ": "جیبوتی",
"DK": "دانمارک",
"DM": "دومینیک",
"RW": "رواندا",
"RU": "روسیه",
"RO": "رومانی",
"RE": "ریونیون",
"ZM": "زامبیا",
"NZ": "زلاند نو",
"ZW": "زیمبابوه",
"ST": "سائو تومه و پرینسیپه",
"CI": "ساحل عاج",
"WS": "ساموا",
"AS": "ساموای امریکا",
"SM": "سان مارینو",
"LK": "سری‌لانکا",
"BL": "سنت بارتلیمی",
"LC": "سنت لوسیا",
"MF": "سنت مارتین",
"SH": "سنت هلن",
"VC": "سنت وینسنت و گرنادین",
"PM": "سنت پیر و میکلون",
"KN": "سنت کیتس و نویس",
"SN": "سنگال",
"SG": "سنگاپور",
"SE": "سوئد",
"CH": "سوئیس",
"SZ": "سوازیلند",
"SD": "سودان",
"SR": "سورینام",
"SY": "سوریه",
"SO": "سومالی",
"SL": "سیرالئون",
"SC": "سیشل",
"CL": "شیلی",
"EH": "صحرای غربی",
"RS": "صربستان",
"CS": "صربستان و مونته‌نگرو",
"IQ": "عراق",
"SA": "عربستان سعودی",
"OM": "عمان",
"GH": "غنا",
"FR": "فرانسه",
"PS": "فلسطین",
"FI": "فنلاند",
"FJ": "فیجی",
"PH": "فیلیپین",
"CY": "قبرس",
"KG": "قرقیزستان",
"KZ": "قزاقستان",
"QA": "قطر",
"LA": "لائوس",
"LB": "لبنان",
"LV": "لتونی",
"LS": "لسوتو",
"PL": "لهستان",
"LU": "لوکزامبورگ",
"LR": "لیبریا",
"LY": "لیبی",
"LT": "لیتوانی",
"LI": "لیختن‌اشتاین",
"MG": "ماداگاسکار",
"MQ": "مارتینیک",
"MW": "مالاوی",
"MT": "مالت",
"MV": "مالدیو",
"MY": "مالزی",
"ML": "مالی",
"MO": "ماکائو، ناحیهٔ ویژهٔ حکومتی چین",
"YT": "مایوت",
"HU": "مجارستان",
"MA": "مراکش",
"IO": "مستعمره‌های بریتانیا در اقیانوس هند",
"TF": "مستعمره‌های جنوبی فرانسه",
"EG": "مصر",
"MN": "مغولستان",
"MK": "مقدونیه",
"MR": "موریتانی",
"MU": "موریس",
"MZ": "موزامبیک",
"MD": "مولداوی",
"MC": "موناکو",
"ME": "مونته‌نگرو",
"MS": "مونت‌سرات",
"MX": "مکزیک",
"MM": "میانمار",
"FM": "میکرونزی",
"NR": "نائورو",
"ZZ": "ناحیهٔ نامشخص یا نامعتبر",
"NA": "نامیبیا",
"NO": "نروژ",
"NP": "نپال",
"NE": "نیجر",
"NG": "نیجریه",
"NU": "نیوئه",
"NI": "نیکاراگوئه",
"HT": "هاییتی",
"NL": "هلند",
"IN": "هند",
"HN": "هندوراس",
"HK": "هنگ‌کنگ، ناحیهٔ ویژهٔ حکومتی چین",
"VA": "واتیکان",
"WF": "والیس و فیوتونا",
"VU": "وانواتو",
"VE": "ونزوئلا",
"VN": "ویتنام",
"PY": "پاراگوئه",
"PW": "پالائو",
"PA": "پاناما",
"PG": "پاپوا گینهٔ نو",
"PK": "پاکستان",
"PT": "پرتغال",
"PE": "پرو",
"PF": "پلی‌نزی فرانسه",
"PR": "پورتو ریکو",
"PN": "پیتکایرن",
"TD": "چاد",
"CN": "چین",
"JP": "ژاپن",
"CR": "کاستاریکا",
"NC": "کالدونیای جدید",
"KH": "کامبوج",
"CM": "کامرون",
"CA": "کانادا",
"KR": "کرهٔ جنوبی",
"KP": "کرهٔ شمالی",
"HR": "کرواسی",
"CO": "کلمبیا",
"CG": "کنگو برازویل",
"CD": "کنگو کینشاسا",
"KE": "کنیا",
"CU": "کوبا",
"KM": "کومورو",
"KW": "کویت",
"KI": "کیریباتی",
"CV": "کیپ ورد",
"GA": "گابون",
"GM": "گامبیا",
"GD": "گرانادا",
"GE": "گرجستان",
"GG": "گرنزی",
"GL": "گروئنلند",
"GT": "گواتمالا",
"GP": "گوادلوپ",
"GU": "گوام",
"GY": "گویان",
"GF": "گویان فرانسه",
"GN": "گینه",
"GQ": "گینهٔ استوایی",
"GW": "گینهٔ بیسائو",
"YE": "یمن",
"GR": "یونان"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afghanistan",
"ZA": "Afrique du Sud",
"AL": "Albanie",
"DZ": "Algérie",
"DE": "Allemagne",
"AD": "Andorre",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctique",
"AG": "Antigua-et-Barbuda",
"AN": "Antilles néerlandaises",
"SA": "Arabie saoudite",
"AR": "Argentine",
"AM": "Arménie",
"AW": "Aruba",
"AU": "Australie",
"AT": "Autriche",
"AZ": "Azerbaïdjan",
"BS": "Bahamas",
"BH": "Bahreïn",
"BD": "Bangladesh",
"BB": "Barbade",
"BE": "Belgique",
"BZ": "Belize",
"BM": "Bermudes",
"BT": "Bhoutan",
"BO": "Bolivie",
"BA": "Bosnie-Herzégovine",
"BW": "Botswana",
"BN": "Brunéi Darussalam",
"BR": "Brésil",
"BG": "Bulgarie",
"BF": "Burkina Faso",
"BI": "Burundi",
"BY": "Bélarus",
"BJ": "Bénin",
"KH": "Cambodge",
"CM": "Cameroun",
"CA": "Canada",
"CV": "Cap-Vert",
"CL": "Chili",
"CN": "Chine",
"CY": "Chypre",
"CO": "Colombie",
"KM": "Comores",
"CG": "Congo",
"KP": "Corée du Nord",
"KR": "Corée du Sud",
"CR": "Costa Rica",
"HR": "Croatie",
"CU": "Cuba",
"CI": "Côte dIvoire",
"DK": "Danemark",
"DJ": "Djibouti",
"DM": "Dominique",
"SV": "El Salvador",
"ES": "Espagne",
"EE": "Estonie",
"FJ": "Fidji",
"FI": "Finlande",
"FR": "France",
"GA": "Gabon",
"GM": "Gambie",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Grenade",
"GL": "Groenland",
"GR": "Grèce",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernesey",
"GN": "Guinée",
"GQ": "Guinée équatoriale",
"GW": "Guinée-Bissau",
"GY": "Guyana",
"GF": "Guyane française",
"GE": "Géorgie",
"GS": "Géorgie du Sud et les îles Sandwich du Sud",
"HT": "Haïti",
"HN": "Honduras",
"HU": "Hongrie",
"IN": "Inde",
"ID": "Indonésie",
"IQ": "Irak",
"IR": "Iran",
"IE": "Irlande",
"IS": "Islande",
"IL": "Israël",
"IT": "Italie",
"JM": "Jamaïque",
"JP": "Japon",
"JE": "Jersey",
"JO": "Jordanie",
"KZ": "Kazakhstan",
"KE": "Kenya",
"KG": "Kirghizistan",
"KI": "Kiribati",
"KW": "Koweït",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Lettonie",
"LB": "Liban",
"LY": "Libye",
"LR": "Libéria",
"LI": "Liechtenstein",
"LT": "Lituanie",
"LU": "Luxembourg",
"MK": "Macédoine",
"MG": "Madagascar",
"MY": "Malaisie",
"MW": "Malawi",
"MV": "Maldives",
"ML": "Mali",
"MT": "Malte",
"MA": "Maroc",
"MQ": "Martinique",
"MU": "Maurice",
"MR": "Mauritanie",
"YT": "Mayotte",
"MX": "Mexique",
"MD": "Moldavie",
"MC": "Monaco",
"MN": "Mongolie",
"MS": "Montserrat",
"ME": "Monténégro",
"MZ": "Mozambique",
"MM": "Myanmar",
"NA": "Namibie",
"NR": "Nauru",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigéria",
"NU": "Niue",
"NO": "Norvège",
"NC": "Nouvelle-Calédonie",
"NZ": "Nouvelle-Zélande",
"NP": "Népal",
"OM": "Oman",
"UG": "Ouganda",
"UZ": "Ouzbékistan",
"PK": "Pakistan",
"PW": "Palaos",
"PA": "Panama",
"PG": "Papouasie-Nouvelle-Guinée",
"PY": "Paraguay",
"NL": "Pays-Bas",
"PH": "Philippines",
"PN": "Pitcairn",
"PL": "Pologne",
"PF": "Polynésie française",
"PR": "Porto Rico",
"PT": "Portugal",
"PE": "Pérou",
"QA": "Qatar",
"HK": "R.A.S. chinoise de Hong Kong",
"MO": "R.A.S. chinoise de Macao",
"RO": "Roumanie",
"GB": "Royaume-Uni",
"RU": "Russie",
"RW": "Rwanda",
"CF": "République centrafricaine",
"DO": "République dominicaine",
"CD": "République démocratique du Congo",
"CZ": "République tchèque",
"RE": "Réunion",
"EH": "Sahara occidental",
"BL": "Saint-Barthélémy",
"KN": "Saint-Kitts-et-Nevis",
"SM": "Saint-Marin",
"MF": "Saint-Martin",
"PM": "Saint-Pierre-et-Miquelon",
"VC": "Saint-Vincent-et-les Grenadines",
"SH": "Sainte-Hélène",
"LC": "Sainte-Lucie",
"WS": "Samoa",
"AS": "Samoa américaines",
"ST": "Sao Tomé-et-Principe",
"RS": "Serbie",
"CS": "Serbie-et-Monténégro",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapour",
"SK": "Slovaquie",
"SI": "Slovénie",
"SO": "Somalie",
"SD": "Soudan",
"LK": "Sri Lanka",
"CH": "Suisse",
"SR": "Suriname",
"SE": "Suède",
"SJ": "Svalbard et Île Jan Mayen",
"SZ": "Swaziland",
"SY": "Syrie",
"SN": "Sénégal",
"TJ": "Tadjikistan",
"TZ": "Tanzanie",
"TW": "Taïwan",
"TD": "Tchad",
"TF": "Terres australes françaises",
"IO": "Territoire britannique de l'océan Indien",
"PS": "Territoire palestinien",
"TH": "Thaïlande",
"TL": "Timor oriental",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinité-et-Tobago",
"TN": "Tunisie",
"TM": "Turkménistan",
"TR": "Turquie",
"TV": "Tuvalu",
"UA": "Ukraine",
"UY": "Uruguay",
"VU": "Vanuatu",
"VE": "Venezuela",
"VN": "Viêt Nam",
"WF": "Wallis-et-Futuna",
"YE": "Yémen",
"ZM": "Zambie",
"ZW": "Zimbabwe",
"ZZ": "région indéterminée",
"EG": "Égypte",
"AE": "Émirats arabes unis",
"EC": "Équateur",
"ER": "Érythrée",
"VA": "État de la Cité du Vatican",
"FM": "États fédérés de Micronésie",
"US": "États-Unis",
"ET": "Éthiopie",
"BV": "Île Bouvet",
"CX": "Île Christmas",
"NF": "Île Norfolk",
"IM": "Île de Man",
"KY": "Îles Caïmans",
"CC": "Îles Cocos - Keeling",
"CK": "Îles Cook",
"FO": "Îles Féroé",
"HM": "Îles Heard et MacDonald",
"FK": "Îles Malouines",
"MP": "Îles Mariannes du Nord",
"MH": "Îles Marshall",
"UM": "Îles Mineures Éloignées des États-Unis",
"SB": "Îles Salomon",
"TC": "Îles Turks et Caïques",
"VG": "Îles Vierges britanniques",
"VI": "Îles Vierges des États-Unis",
"AX": "Îles Åland"
}

View File

@ -0,0 +1,250 @@
{
"UG": "אוגנדה",
"UZ": "אוזבקיסטן",
"AT": "אוסטריה",
"AU": "אוסטרליה",
"UA": "אוקראינה",
"UY": "אורוגוואי",
"ZZ": "אזור לא ידוע או לא תקין",
"AZ": "אזרביג'ן",
"AE": "איחוד האמירויות הערביות",
"IT": "איטליה",
"AX": "איי אלנד",
"BS": "איי בהאמה",
"BV": "איי בובה",
"VI": "איי הבתולה האמריקניים",
"VG": "איי הבתולה הבריטיים",
"HM": "איי הרד ואיי מקדונלנד",
"WF": "איי ווליס ופוטונה",
"TC": "איי טורקס וקאיקוס",
"CX": "איי כריסטמס",
"MP": "איי מריאנה הצפוניים",
"MH": "איי מרשל",
"NF": "איי נורפוק",
"SC": "איי סיישל",
"FO": "איי פארו",
"FK": "איי פוקלנד",
"CK": "איי קוק",
"CC": "איי קוקוס",
"KY": "איי קיימן",
"SB": "איי שלמה",
"UM": "איים קטנים שלחוף ארצות הברית",
"ID": "אינדונזיה",
"IS": "איסלנד",
"IR": "איראן",
"IE": "אירלנד",
"SV": "אל סלבדור",
"AL": "אלבניה",
"DZ": "אלג׳יריה",
"AO": "אנגולה",
"AI": "אנגילה",
"AD": "אנדורה",
"AQ": "אנטארקטיקה",
"AG": "אנטיגואה וברבודה",
"AN": "אנטילים הולנדיים",
"EE": "אסטוניה",
"AF": "אפגניסטן",
"EC": "אקוודור",
"AR": "ארגנטינה",
"AW": "ארובה",
"ER": "אריתראה",
"AM": "ארמניה",
"US": "ארצות הברית",
"ET": "אתיופיה",
"BT": "בהוטן",
"BW": "בוטסוואנה",
"BG": "בולגריה",
"BO": "בוליביה",
"BA": "בוסניה והרצגובינה",
"BI": "בורונדי",
"BF": "בורקינה פאסו",
"BH": "בחריין",
"BY": "בלארוס",
"BE": "בלגיה",
"BZ": "בליז",
"BD": "בנגלדש",
"BJ": "בנין",
"BB": "ברבדוס",
"BN": "ברוניי",
"BR": "ברזיל",
"GB": "בריטניה",
"BM": "ברמודה",
"JE": "ג'רסי",
"GA": "גאבון",
"GE": "גאורגיה",
"GH": "גאנה",
"GT": "גואטמלה",
"GU": "גואם",
"GP": "גוואדלופ",
"GY": "גיאנה",
"GF": "גיאנה הצרפתית",
"GI": "גיברלטר",
"GN": "גיניאה",
"GQ": "גיניאה המשוונית",
"GW": "גיניאה-ביסאו",
"GM": "גמביה",
"GL": "גרינלנד",
"DE": "גרמניה",
"GD": "גרנדה",
"GG": "גרנסי",
"GS": "ג׳ורג׳יה הדרומית ואיי סנדוויץ׳ הדרומיים",
"DJ": "ג׳יבוטי",
"JM": "ג׳מייקה",
"DM": "דומיניקה",
"DK": "דנמרק",
"ZA": "דרום אפריקה",
"KR": "דרום קוריאה",
"IM": "האי מאן",
"HT": "האיטי",
"IN": "הודו",
"VA": "הוותיקן",
"NL": "הולנד",
"HK": "הונג קונג (מחוז מנהלי מיוחד של סין)",
"HU": "הונגריה",
"HN": "הונדורס",
"DO": "הרפובליקה הדומיניקנית",
"CF": "הרפובליקה של מרכז אפריקה",
"PS": "הרשות הפלסטינית",
"VN": "וייטנאם",
"VU": "ונואטו",
"VE": "ונצואלה",
"ZW": "זימבאבווה",
"ZM": "זמביה",
"CI": "חוף השנהב",
"TJ": "טג׳יקיסטן",
"TV": "טובלו",
"TG": "טוגו",
"TO": "טונגה",
"TK": "טוקלאו",
"TR": "טורקיה",
"TM": "טורקמניסטן",
"TW": "טייוואן",
"TZ": "טנזניה",
"IO": "טריטוריה בריטית באוקיאנוס ההודי",
"TF": "טריטוריות דרומיות של צרפת",
"TT": "טרינידד וטובגו",
"GR": "יוון",
"JP": "יפן",
"JO": "ירדן",
"IL": "ישראל",
"KW": "כווית",
"CV": "כף ורדה",
"LA": "לאוס",
"LB": "לבנון",
"LY": "לוב",
"LU": "לוקסמבורג",
"LV": "לטביה",
"LR": "ליבריה",
"LT": "ליטא",
"LI": "ליכטנשטיין",
"LS": "לסוטו",
"MR": "מאוריטניה",
"MU": "מאוריציוס",
"YT": "מאיוט",
"ML": "מאלי",
"MG": "מדגסקר",
"MZ": "מוזמביק",
"MD": "מולדובה",
"MN": "מונגוליה",
"ME": "מונטנגרו",
"MS": "מונסראט",
"MC": "מונקו",
"TL": "מזרח טימור",
"MM": "מייאנמאר",
"FM": "מיקרונזיה",
"MW": "מלאווי",
"MV": "מלדיבים",
"MY": "מלזיה",
"MT": "מלטה",
"EG": "מצרים",
"MO": "מקאו (מחוז מנהלי מיוחד של סין)",
"MK": "מקדוניה",
"MX": "מקסיקו",
"MA": "מרוקו",
"MQ": "מרטיניק",
"NR": "נאורו",
"NO": "נורווגיה",
"NG": "ניגריה",
"NZ": "ניו זילנד",
"NU": "ניווה",
"NE": "ניז׳ר",
"NI": "ניקרגואה",
"NA": "נמיביה",
"NP": "נפאל",
"ST": "סאו טומה ופרינסיפה",
"EH": "סהרה המערבית",
"SD": "סודן",
"SZ": "סווזילנד",
"SJ": "סוולבארד וז׳אן מאיין",
"SO": "סומליה",
"SY": "סוריה",
"SR": "סורינם",
"SL": "סיירה לאונה",
"CN": "סין",
"SG": "סינגפור",
"SI": "סלובניה",
"SK": "סלובקיה",
"WS": "סמואה",
"AS": "סמואה האמריקנית",
"SM": "סן מרינו",
"SN": "סנגל",
"BL": "סנט ברתולומיאו",
"SH": "סנט הלנה",
"VC": "סנט וינסנט והגרנדינים",
"LC": "סנט לוסיה",
"MF": "סנט מרטין",
"PM": "סנט פייר ומיקלון",
"KN": "סנט קיטס ונוויס",
"ES": "ספרד",
"RS": "סרביה",
"CS": "סרביה ומונטנגרו",
"LK": "סרי לנקה",
"OM": "עומאן",
"IQ": "עיראק",
"SA": "ערב הסעודית",
"PW": "פאלאו",
"PL": "פולין",
"PF": "פולינזיה הצרפתית",
"PR": "פורטו ריקו",
"PT": "פורטוגל",
"FJ": "פיג׳י",
"PN": "פיטקרן",
"PH": "פיליפינים",
"FI": "פינלנד",
"PA": "פנמה",
"PG": "פפואה גיניאה החדשה",
"PK": "פקיסטן",
"PY": "פרגוואי",
"PE": "פרו",
"KP": "צפון קוריאה",
"FR": "צרפת",
"TD": "צ׳אד",
"CL": "צ׳ילה",
"CZ": "צ׳כיה",
"CU": "קובה",
"CO": "קולומביה",
"KM": "קומורוס",
"CG": "קונגו - ברזאויל",
"CD": "קונגו - קינשאסה",
"CR": "קוסטה ריקה",
"KZ": "קזחסטן",
"QA": "קטאר",
"KG": "קירגיזסטן",
"KI": "קיריבאטי",
"NC": "קלדוניה החדשה",
"KH": "קמבודיה",
"CM": "קמרון",
"CA": "קנדה",
"KE": "קניה",
"CY": "קפריסין",
"HR": "קרואטיה",
"RE": "ראוניון",
"RW": "רואנדה",
"RO": "רומניה",
"RU": "רוסיה",
"SE": "שוודיה",
"CH": "שווייץ",
"TH": "תאילנד",
"TN": "תוניסיה",
"YE": "תימן"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afganisztán",
"AX": "Aland-szigetek",
"AL": "Albánia",
"DZ": "Algéria",
"UM": "Amerikai Csendes-óceáni Szigetek",
"AS": "Amerikai Szamoa",
"VI": "Amerikai Virgin-szigetek",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarktisz",
"AG": "Antigua és Barbuda",
"AR": "Argentína",
"AW": "Aruba",
"AT": "Ausztria",
"AU": "Ausztrália",
"AZ": "Azerbajdzsán",
"BS": "Bahamák",
"BH": "Bahrein",
"BD": "Banglades",
"BB": "Barbados",
"BE": "Belgium",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhután",
"BO": "Bolívia",
"BA": "Bosznia-Hercegovina",
"BW": "Botswana",
"BV": "Bouvet-sziget",
"BR": "Brazília",
"IO": "Brit Indiai Oceán",
"VG": "Brit Virgin-szigetek",
"BN": "Brunei",
"BG": "Bulgária",
"BF": "Burkina Faso",
"BI": "Burundi",
"CL": "Chile",
"CY": "Ciprus",
"KM": "Comore-szigetek",
"CK": "Cook-szigetek",
"CR": "Costa Rica",
"CZ": "Csehország",
"TD": "Csád",
"DM": "Dominika",
"DO": "Dominikai Köztársaság",
"DJ": "Dzsibuti",
"DK": "Dánia",
"GS": "Dél Grúzia és a Déli Szendvics-szigetek",
"ZA": "Dél-Afrika",
"KR": "Dél-Korea",
"EC": "Ecuador",
"GQ": "Egyenlítői-Guinea",
"AE": "Egyesült Arab Emirátus",
"GB": "Egyesült Királyság",
"US": "Egyesült Államok",
"EG": "Egyiptom",
"CI": "Elefántcsontpart",
"ER": "Eritrea",
"ET": "Etiópia",
"FK": "Falkland-szigetek",
"BY": "Fehéroroszország",
"FO": "Feröer-szigetek",
"FJ": "Fidzsi",
"FI": "Finnország",
"TF": "Francia Déli Területek",
"GF": "Francia Guyana",
"PF": "Francia Polinézia",
"FR": "Franciaország",
"PH": "Fülöp-szigetek",
"GA": "Gabon",
"GM": "Gambia",
"GH": "Ghána",
"GI": "Gibraltár",
"GD": "Grenada",
"GL": "Grönland",
"GE": "Grúzia",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"GR": "Görögország",
"HT": "Haiti",
"HM": "Heard és McDonald Szigetek",
"AN": "Holland Antillák",
"NL": "Hollandia",
"HN": "Honduras",
"HK": "Hongkong S.A.R, Kína",
"HR": "Horvátország",
"IN": "India",
"ID": "Indonézia",
"IQ": "Irak",
"IR": "Irán",
"ZZ": "Ismeretlen vagy érvénytelen körzet",
"IS": "Izland",
"IL": "Izrael",
"JM": "Jamaica",
"JP": "Japán",
"YE": "Jemen",
"JE": "Jersey",
"JO": "Jordánia",
"KY": "Kajmán-szigetek",
"KH": "Kambodzsa",
"CM": "Kamerun",
"CA": "Kanada",
"CX": "Karácsony-szigetek",
"QA": "Katar",
"KZ": "Kazahsztán",
"TL": "Kelet-Timor",
"KE": "Kenya",
"KG": "Kirgizisztán",
"KI": "Kiribati",
"CO": "Kolumbia",
"CG": "Kongó",
"CD": "Kongó - Kinshasa",
"CU": "Kuba",
"KW": "Kuvait",
"CN": "Kína",
"CC": "Kókusz-szigetek",
"CF": "Közép-afrikai Köztársaság",
"LA": "Laosz",
"PL": "Lengyelország",
"LS": "Lesotho",
"LV": "Lettország",
"LB": "Libanon",
"LR": "Libéria",
"LI": "Liechtenstein",
"LT": "Litvánia",
"LU": "Luxemburg",
"LY": "Líbia",
"MK": "Macedónia",
"MG": "Madagaszkár",
"HU": "Magyarország",
"MO": "Makaó SAR Kína",
"MY": "Malajzia",
"MW": "Malawi",
"MV": "Maldív-szigetek",
"ML": "Mali",
"IM": "Man-sziget",
"MA": "Marokkó",
"MH": "Marshall-szigetek",
"MQ": "Martinique",
"MU": "Mauritius",
"MR": "Mauritánia",
"YT": "Mayotte",
"MX": "Mexikó",
"MM": "Mianmar",
"FM": "Mikronézia",
"MD": "Moldova",
"MC": "Monaco",
"MN": "Mongólia",
"ME": "Montenegró",
"MS": "Montserrat",
"MZ": "Mozambik",
"MT": "Málta",
"NA": "Namíbia",
"NR": "Nauru",
"NP": "Nepál",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigéria",
"NU": "Niue",
"NF": "Norfolk-sziget",
"NO": "Norvégia",
"EH": "Nyugat-Szahara",
"DE": "Németország",
"IT": "Olaszország",
"OM": "Omán",
"RU": "Oroszország",
"PK": "Pakisztán",
"PW": "Palau",
"PS": "Palesztin Terület",
"PA": "Panama",
"PY": "Paraguay",
"PE": "Peru",
"PN": "Pitcairn-sziget",
"PT": "Portugália",
"PR": "Puerto Rico",
"PG": "Pápua Új-Guinea",
"RE": "Reunion",
"RO": "Románia",
"RW": "Ruanda",
"BL": "Saint Barthélemy",
"KN": "Saint Kitts és Nevis",
"MF": "Saint Martin",
"PM": "Saint Pierre és Miquelon",
"VC": "Saint Vincent és Grenadines",
"SB": "Salamon-szigetek",
"SV": "Salvador",
"SM": "San Marino",
"LC": "Santa Lucia",
"ST": "Sao Tomé és Príncipe",
"SC": "Seychelle-szigetek",
"SL": "Sierra Leone",
"ES": "Spanyolország",
"LK": "Srí Lanka",
"SR": "Suriname",
"SJ": "Svalbard és Jan Mayen",
"CH": "Svájc",
"SE": "Svédország",
"WS": "Szamoa",
"SA": "Szaúd-Arábia",
"SN": "Szenegál",
"SH": "Szent Helena",
"RS": "Szerbia",
"CS": "Szerbia és Montenegró",
"SG": "Szingapúr",
"SK": "Szlovákia",
"SI": "Szlovénia",
"SO": "Szomália",
"SD": "Szudán",
"SZ": "Szváziföld",
"SY": "Szíria",
"TJ": "Tadzsikisztán",
"TW": "Tajvan",
"TZ": "Tanzánia",
"TH": "Thaiföld",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad és Tobago",
"TN": "Tunézia",
"TC": "Turks- és Caicos-szigetek",
"TV": "Tuvalu",
"TR": "Törökország",
"TM": "Türkmenisztán",
"UG": "Uganda",
"UA": "Ukrajna",
"UY": "Uruguay",
"VU": "Vanuatu",
"VA": "Vatikán",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis és Futuna",
"ZM": "Zambia",
"ZW": "Zimbabwe",
"CV": "Zöld-foki Köztársaság",
"KP": "Észak-Korea",
"MP": "Északi Mariana-szigetek",
"EE": "Észtország",
"IE": "Írország",
"AM": "Örményország",
"NC": "Új-Kaledónia",
"NZ": "Új-Zéland",
"UZ": "Üzbegisztán"
}

View File

@ -0,0 +1,249 @@
{
"AF": "Afghanistan",
"AL": "Albania",
"DZ": "Algeria",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antartide",
"AG": "Antigua e Barbuda",
"AN": "Antille Olandesi",
"SA": "Arabia Saudita",
"AR": "Argentina",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbaigian",
"BS": "Bahamas",
"BH": "Bahrein",
"BD": "Bangladesh",
"BB": "Barbados",
"BE": "Belgio",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BY": "Bielorussia",
"BO": "Bolivia",
"BA": "Bosnia Erzegovina",
"BW": "Botswana",
"BR": "Brasile",
"BN": "Brunei",
"BG": "Bulgaria",
"BF": "Burkina Faso",
"BI": "Burundi",
"KH": "Cambogia",
"CM": "Camerun",
"CA": "Canada",
"CV": "Capo Verde",
"TD": "Ciad",
"CL": "Cile",
"CN": "Cina",
"CY": "Cipro",
"CO": "Colombia",
"KM": "Comore",
"CG": "Congo",
"KP": "Corea del Nord",
"KR": "Corea del Sud",
"CR": "Costa Rica",
"CI": "Costa dAvorio",
"HR": "Croazia",
"CU": "Cuba",
"DK": "Danimarca",
"DM": "Dominica",
"EC": "Ecuador",
"EG": "Egitto",
"SV": "El Salvador",
"AE": "Emirati Arabi Uniti",
"ER": "Eritrea",
"EE": "Estonia",
"ET": "Etiopia",
"RU": "Federazione Russa",
"FJ": "Figi",
"PH": "Filippine",
"FI": "Finlandia",
"FR": "Francia",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgia",
"GS": "Georgia del Sud e Isole Sandwich del Sud",
"DE": "Germania",
"GH": "Ghana",
"JM": "Giamaica",
"JP": "Giappone",
"GI": "Gibilterra",
"DJ": "Gibuti",
"JO": "Giordania",
"GR": "Grecia",
"GD": "Grenada",
"GL": "Groenlandia",
"GP": "Guadalupa",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GF": "Guiana Francese",
"GN": "Guinea",
"GQ": "Guinea Equatoriale",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HN": "Honduras",
"IN": "India",
"ID": "Indonesia",
"IR": "Iran",
"IQ": "Iraq",
"IE": "Irlanda",
"IS": "Islanda",
"BV": "Isola Bouvet",
"NF": "Isola Norfolk",
"CX": "Isola di Christmas",
"IM": "Isola di Man",
"AX": "Isole Aland",
"KY": "Isole Cayman",
"CC": "Isole Cocos",
"CK": "Isole Cook",
"FK": "Isole Falkland",
"FO": "Isole Faroe",
"HM": "Isole Heard ed Isole McDonald",
"MP": "Isole Marianne Settentrionali",
"MH": "Isole Marshall",
"UM": "Isole Minori lontane dagli Stati Uniti",
"SB": "Isole Solomon",
"TC": "Isole Turks e Caicos",
"VI": "Isole Vergini Americane",
"VG": "Isole Vergini Britanniche",
"IL": "Israele",
"IT": "Italia",
"JE": "Jersey",
"KZ": "Kazakistan",
"KE": "Kenya",
"KG": "Kirghizistan",
"KI": "Kiribati",
"KW": "Kuwait",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Lettonia",
"LB": "Libano",
"LR": "Liberia",
"LY": "Libia",
"LI": "Liechtenstein",
"LT": "Lituania",
"LU": "Lussemburgo",
"MG": "Madagascar",
"MW": "Malawi",
"MV": "Maldive",
"MY": "Malesia",
"ML": "Mali",
"MT": "Malta",
"MA": "Marocco",
"MQ": "Martinica",
"MR": "Mauritania",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Messico",
"FM": "Micronesia",
"MD": "Moldavia",
"MC": "Monaco",
"MN": "Mongolia",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Mozambico",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"NO": "Norvegia",
"NC": "Nuova Caledonia",
"NZ": "Nuova Zelanda",
"OM": "Oman",
"NL": "Paesi Bassi",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestina",
"PA": "Panama",
"PG": "Papua Nuova Guinea",
"PY": "Paraguay",
"PE": "Perù",
"PN": "Pitcairn",
"PF": "Polinesia Francese",
"PL": "Polonia",
"PT": "Portogallo",
"PR": "Portorico",
"QA": "Qatar",
"HK": "Regione Amministrativa Speciale di Hong Kong della Repubblica Popolare Cinese",
"MO": "Regione Amministrativa Speciale di Macao della Repubblica Popolare Cinese",
"GB": "Regno Unito",
"CZ": "Repubblica Ceca",
"CF": "Repubblica Centrafricana",
"CD": "Repubblica Democratica del Congo",
"DO": "Repubblica Dominicana",
"MK": "Repubblica di Macedonia",
"RO": "Romania",
"RW": "Ruanda",
"RE": "Réunion",
"EH": "Sahara Occidentale",
"KN": "Saint Kitts e Nevis",
"LC": "Saint Lucia",
"PM": "Saint Pierre e Miquelon",
"VC": "Saint Vincent e Grenadines",
"WS": "Samoa",
"AS": "Samoa Americane",
"BL": "San Bartolomeo",
"SM": "San Marino",
"SH": "SantElena",
"ST": "Sao Tomé e Príncipe",
"SN": "Senegal",
"RS": "Serbia",
"CS": "Serbia e Montenegro",
"SC": "Seychelles",
"SL": "Sierra Leone",
"SG": "Singapore",
"SY": "Siria",
"SK": "Slovacchia",
"SI": "Slovenia",
"SO": "Somalia",
"ES": "Spagna",
"LK": "Sri Lanka",
"US": "Stati Uniti",
"ZA": "Sudafrica",
"SD": "Sudan",
"SR": "Suriname",
"SJ": "Svalbard e Jan Mayen",
"SE": "Svezia",
"CH": "Svizzera",
"SZ": "Swaziland",
"TJ": "Tagikistan",
"TH": "Tailandia",
"TW": "Taiwan",
"TZ": "Tanzania",
"TF": "Territori australi francesi",
"IO": "Territorio Britannico dellOceano Indiano",
"TL": "Timor Est",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad e Tobago",
"TN": "Tunisia",
"TR": "Turchia",
"TM": "Turkmenistan",
"TV": "Tuvalu",
"UA": "Ucraina",
"UG": "Uganda",
"HU": "Ungheria",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VA": "Vaticano",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis e Futuna",
"YE": "Yemen",
"ZM": "Zambia",
"ZW": "Zimbabwe",
"ZZ": "regione non valida o sconosciuta"
}

View File

@ -0,0 +1,250 @@
{
"IS": "アイスランド",
"IE": "アイルランド",
"AZ": "アゼルバイジャン",
"AF": "アフガニスタン",
"US": "アメリカ合衆国",
"VI": "アメリカ領ヴァージン諸島",
"AE": "アラブ首長国連邦",
"DZ": "アルジェリア",
"AR": "アルゼンチン",
"AL": "アルバニア",
"AW": "アルバ島",
"AM": "アルメニア",
"AI": "アンギラ",
"AO": "アンゴラ",
"AG": "アンティグア・バーブーダ",
"AD": "アンドラ",
"YE": "イエメン",
"GB": "イギリス",
"VG": "イギリス領ヴァージン諸島",
"IL": "イスラエル",
"IT": "イタリア",
"IQ": "イラク",
"IR": "イラン",
"IN": "インド",
"ID": "インドネシア",
"WF": "ウォリス・フツナ",
"UG": "ウガンダ",
"UA": "ウクライナ",
"UZ": "ウズベキスタン",
"UY": "ウルグアイ",
"EC": "エクアドル",
"EG": "エジプト",
"EE": "エストニア",
"ET": "エチオピア",
"ER": "エリトリア",
"SV": "エルサルバドル",
"OM": "オマーン",
"NL": "オランダ",
"AN": "オランダ領アンティル諸島",
"AU": "オーストラリア",
"AT": "オーストリア",
"AX": "オーランド諸島",
"KZ": "カザフスタン",
"QA": "カタール",
"CA": "カナダ",
"CM": "カメルーン",
"KH": "カンボジア",
"CV": "カーボベルデ",
"GY": "ガイアナ",
"GA": "ガボン",
"GM": "ガンビア",
"GH": "ガーナ",
"GG": "ガーンジー",
"CY": "キプロス",
"CU": "キューバ",
"KI": "キリバス",
"KG": "キルギスタン",
"GN": "ギニア",
"GW": "ギニアビサウ",
"GR": "ギリシャ",
"KW": "クウェート",
"CK": "クック諸島",
"CX": "クリスマス島",
"HR": "クロアチア",
"GT": "グアテマラ",
"GP": "グアドループ",
"GU": "グアム",
"GL": "グリーンランド",
"GE": "グルジア",
"GD": "グレナダ",
"KY": "ケイマン諸島",
"KE": "ケニア",
"CC": "ココス (キーリング) 諸島",
"CR": "コスタリカ",
"KM": "コモロ",
"CO": "コロンビア",
"CG": "コンゴ共和国 (ブラザビル)",
"CD": "コンゴ民主共和国 (キンシャサ)",
"CI": "コートジボワール",
"SA": "サウジアラビア",
"WS": "サモア",
"ST": "サントメ・プリンシペ",
"PM": "サンピエール島・ミクロン島",
"SM": "サンマリノ",
"BL": "サン・バルテルミー",
"ZM": "ザンビア",
"SL": "シエラレオネ",
"SY": "シリア",
"SG": "シンガポール",
"DJ": "ジブチ",
"GI": "ジブラルタル",
"JM": "ジャマイカ",
"JE": "ジャージー",
"ZW": "ジンバブエ",
"CH": "スイス",
"SE": "スウェーデン",
"SJ": "スバールバル諸島・ヤンマイエン島",
"ES": "スペイン",
"SR": "スリナム",
"LK": "スリランカ",
"SK": "スロバキア",
"SI": "スロベニア",
"SZ": "スワジランド",
"SD": "スーダン",
"SN": "セネガル",
"RS": "セルビア",
"CS": "セルビア・モンテネグロ",
"KN": "セントクリストファー・ネイビス",
"VC": "セントビンセント・グレナディーン諸島",
"SH": "セントヘレナ",
"LC": "セントルシア",
"MF": "セント・マーチン",
"SC": "セーシェル",
"SO": "ソマリア",
"SB": "ソロモン諸島",
"TH": "タイ",
"TJ": "タジキスタン",
"TZ": "タンザニア",
"TC": "タークス諸島・カイコス諸島",
"CZ": "チェコ共和国",
"TD": "チャド",
"TN": "チュニジア",
"CL": "チリ",
"TV": "ツバル",
"DK": "デンマーク",
"TK": "トケラウ諸島",
"TT": "トリニダード・トバゴ",
"TM": "トルクメニスタン",
"TR": "トルコ",
"TO": "トンガ",
"TG": "トーゴ",
"DE": "ドイツ",
"DO": "ドミニカ共和国",
"DM": "ドミニカ国",
"NG": "ナイジェリア",
"NR": "ナウル",
"NA": "ナミビア",
"NU": "ニウエ島",
"NI": "ニカラグア",
"NE": "ニジェール",
"NC": "ニューカレドニア",
"NZ": "ニュージーランド",
"NP": "ネパール",
"NO": "ノルウェー",
"NF": "ノーフォーク島",
"HT": "ハイチ",
"HU": "ハンガリー",
"HM": "ハード島・マクドナルド諸島",
"VA": "バチカン市国",
"VU": "バヌアツ",
"BS": "バハマ",
"BM": "バミューダ",
"BB": "バルバドス",
"BD": "バングラデシュ",
"BH": "バーレーン",
"PK": "パキスタン",
"PA": "パナマ",
"PG": "パプアニューギニア",
"PW": "パラオ",
"PY": "パラグアイ",
"PS": "パレスチナ領土",
"PN": "ピトケアン島",
"FJ": "フィジー",
"PH": "フィリピン",
"FI": "フィンランド",
"FO": "フェロー諸島",
"FK": "フォークランド諸島",
"FR": "フランス",
"TF": "フランス領極南諸島",
"BR": "ブラジル",
"BG": "ブルガリア",
"BF": "ブルキナファソ",
"BN": "ブルネイ",
"BI": "ブルンジ",
"BT": "ブータン",
"BV": "ブーベ島",
"PR": "プエルトリコ",
"VN": "ベトナム",
"BJ": "ベニン",
"VE": "ベネズエラ",
"BY": "ベラルーシ",
"BZ": "ベリーズ",
"BE": "ベルギー",
"PE": "ペルー",
"HN": "ホンジュラス",
"BA": "ボスニア・ヘルツェゴビナ",
"BW": "ボツワナ",
"BO": "ボリビア",
"PT": "ポルトガル",
"PL": "ポーランド",
"MK": "マケドニア",
"MG": "マダガスカル",
"YT": "マヨット島",
"MW": "マラウィ",
"ML": "マリ",
"MT": "マルタ",
"MQ": "マルティニーク島",
"MY": "マレーシア",
"IM": "マン島",
"MH": "マーシャル諸島共和国",
"FM": "ミクロネシア",
"MM": "ミャンマー",
"MX": "メキシコ",
"MZ": "モザンビーク",
"MC": "モナコ",
"MV": "モルジブ",
"MD": "モルドバ",
"MA": "モロッコ",
"MN": "モンゴル",
"ME": "モンテネグロ",
"MS": "モントセラト島",
"MU": "モーリシャス",
"MR": "モーリタニア",
"JO": "ヨルダン",
"LA": "ラオス",
"LV": "ラトビア",
"LT": "リトアニア",
"LI": "リヒテンシュタイン",
"LY": "リビア",
"LR": "リベリア",
"LU": "ルクセンブルグ",
"RW": "ルワンダ",
"RO": "ルーマニア",
"LS": "レソト",
"LB": "レバノン",
"RE": "レユニオン島",
"RU": "ロシア",
"ZZ": "不明な地域",
"CN": "中国",
"CF": "中央アフリカ共和国",
"MO": "中華人民共和国マカオ特別行政区",
"HK": "中華人民共和国香港特別行政区",
"GF": "仏領ギアナ",
"PF": "仏領ポリネシア",
"MP": "北マリアナ諸島",
"ZA": "南アフリカ",
"GS": "南ジョージア島・南サンドイッチ諸島",
"AQ": "南極大陸",
"TW": "台湾",
"KR": "大韓民国",
"JP": "日本",
"KP": "朝鮮民主主義人民共和国",
"TL": "東ティモール",
"AS": "米領サモア",
"UM": "米領太平洋諸島",
"IO": "英領インド洋植民地",
"EH": "西サハラ",
"GQ": "赤道ギニア"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afghanistan",
"AX": "Alandeilanden",
"AL": "Albanië",
"DZ": "Algerije",
"AS": "Amerikaans Samoa",
"VI": "Amerikaanse Maagdeneilanden",
"UM": "Amerikaanse kleinere afgelegen eilanden",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
"AG": "Antigua en Barbuda",
"AR": "Argentinië",
"AM": "Armenië",
"AW": "Aruba",
"AU": "Australië",
"AZ": "Azerbeidzjan",
"BS": "Bahamas",
"BH": "Bahrein",
"BD": "Bangladesh",
"BB": "Barbados",
"BE": "België",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivia",
"BA": "Bosnië en Herzegovina",
"BW": "Botswana",
"BV": "Bouveteiland",
"BR": "Brazilië",
"IO": "Britse Gebieden in de Indische Oceaan",
"VG": "Britse Maagdeneilanden",
"BN": "Brunei",
"BG": "Bulgarije",
"BF": "Burkina Faso",
"BI": "Burundi",
"KH": "Cambodja",
"CA": "Canada",
"KY": "Caymaneilanden",
"CF": "Centraal-Afrikaanse Republiek",
"CL": "Chili",
"CN": "China",
"CX": "Christmaseiland",
"CC": "Cocoseilanden",
"CO": "Colombia",
"KM": "Comoren",
"CG": "Congo",
"CD": "Congo-Kinshasa",
"CK": "Cookeilanden",
"CR": "Costa Rica",
"CU": "Cuba",
"CY": "Cyprus",
"DK": "Denemarken",
"DJ": "Djibouti",
"DM": "Dominica",
"DO": "Dominicaanse Republiek",
"DE": "Duitsland",
"EC": "Ecuador",
"EG": "Egypte",
"SV": "El Salvador",
"GQ": "Equatoriaal-Guinea",
"ER": "Eritrea",
"EE": "Estland",
"ET": "Ethiopië",
"FO": "Faeröer",
"FK": "Falklandeilanden",
"FJ": "Fiji",
"PH": "Filipijnen",
"FI": "Finland",
"FR": "Frankrijk",
"GF": "Frans-Guyana",
"PF": "Frans-Polynesië",
"TF": "Franse Gebieden in de zuidelijke Indische Oceaan",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgië",
"GH": "Ghana",
"GI": "Gibraltar",
"GD": "Grenada",
"GR": "Griekenland",
"GL": "Groenland",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinee",
"GW": "Guinee-Bissau",
"GY": "Guyana",
"HT": "Haïti",
"HM": "Heard- en McDonaldeilanden",
"HN": "Honduras",
"HU": "Hongarije",
"HK": "Hongkong SAR van China",
"IS": "IJsland",
"IE": "Ierland",
"IN": "India",
"ID": "Indonesië",
"IQ": "Irak",
"IR": "Iran",
"IM": "Isle of Man",
"IL": "Israël",
"IT": "Italië",
"CI": "Ivoorkust",
"JM": "Jamaica",
"JP": "Japan",
"YE": "Jemen",
"JE": "Jersey",
"JO": "Jordanië",
"CV": "Kaapverdië",
"CM": "Kameroen",
"KZ": "Kazachstan",
"KE": "Kenia",
"KG": "Kirgizië",
"KI": "Kiribati",
"KW": "Koeweit",
"HR": "Kroatië",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Letland",
"LB": "Libanon",
"LR": "Liberia",
"LY": "Libië",
"LI": "Liechtenstein",
"LT": "Litouwen",
"LU": "Luxemburg",
"MO": "Macao SAR van China",
"MK": "Macedonië",
"MG": "Madagaskar",
"MW": "Malawi",
"MV": "Maldiven",
"MY": "Maleisië",
"ML": "Mali",
"MT": "Malta",
"MA": "Marokko",
"MH": "Marshalleilanden",
"MQ": "Martinique",
"MR": "Mauritanië",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Mexico",
"FM": "Micronesië",
"MD": "Moldavië",
"MC": "Monaco",
"MN": "Mongolië",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Mozambique",
"MM": "Myanmar",
"NA": "Namibië",
"NR": "Nauru",
"NL": "Nederland",
"AN": "Nederlandse Antillen",
"NP": "Nepal",
"NI": "Nicaragua",
"NC": "Nieuw-Caledonië",
"NZ": "Nieuw-Zeeland",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"KP": "Noord-Korea",
"MP": "Noordelijke Marianeneilanden",
"NO": "Noorwegen",
"NF": "Norfolkeiland",
"UG": "Oeganda",
"UA": "Oekraïne",
"UZ": "Oezbekistan",
"OM": "Oman",
"ZZ": "Onbekend of onjuist gebied",
"TL": "Oost-Timor",
"AT": "Oostenrijk",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestijns Gebied",
"PA": "Panama",
"PG": "Papoea-Nieuw-Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PN": "Pitcairn",
"PL": "Polen",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"RO": "Roemenië",
"RU": "Rusland",
"RW": "Rwanda",
"RE": "Réunion",
"BL": "Saint Barthélemy",
"KN": "Saint Kitts en Nevis",
"LC": "Saint Lucia",
"PM": "Saint Pierre en Miquelon",
"VC": "Saint Vincent en de Grenadines",
"SB": "Salomonseilanden",
"WS": "Samoa",
"SM": "San Marino",
"ST": "Sao Tomé en Principe",
"SA": "Saoedi-Arabië",
"SN": "Senegal",
"RS": "Servië",
"CS": "Servië en Montenegro",
"SC": "Seychellen",
"SL": "Sierra Leone",
"SG": "Singapore",
"SH": "Sint-Helena",
"MF": "Sint-Maarten",
"SI": "Slovenië",
"SK": "Slowakije",
"SD": "Soedan",
"SO": "Somalië",
"ES": "Spanje",
"LK": "Sri Lanka",
"SR": "Suriname",
"SJ": "Svalbard en Jan Mayen",
"SZ": "Swaziland",
"SY": "Syrië",
"TJ": "Tadzjikistan",
"TW": "Taiwan",
"TZ": "Tanzania",
"TH": "Thailand",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad en Tobago",
"TD": "Tsjaad",
"CZ": "Tsjechië",
"TN": "Tunesië",
"TR": "Turkije",
"TM": "Turkmenistan",
"TC": "Turks- en Caicoseilanden",
"TV": "Tuvalu",
"UY": "Uruguay",
"VU": "Vanuatu",
"VA": "Vaticaanstad",
"VE": "Venezuela",
"GB": "Verenigd Koninkrijk",
"AE": "Verenigde Arabische Emiraten",
"US": "Verenigde Staten",
"VN": "Vietnam",
"WF": "Wallis en Futuna",
"EH": "Westelijke Sahara",
"BY": "Wit-Rusland",
"ZM": "Zambia",
"ZW": "Zimbabwe",
"ZA": "Zuid-Afrika",
"GS": "Zuid-Georgië en Zuidelijke Sandwicheilanden",
"KR": "Zuid-Korea",
"SE": "Zweden",
"CH": "Zwitserland"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afganistan",
"AL": "Albania",
"DZ": "Algieria",
"AD": "Andora",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarktyka",
"AG": "Antigua i Barbuda",
"AN": "Antyle Holenderskie",
"SA": "Arabia Saudyjska",
"AR": "Argentyna",
"AM": "Armenia",
"AW": "Aruba",
"AU": "Australia",
"AT": "Austria",
"AZ": "Azerbejdżan",
"BS": "Bahamy",
"BH": "Bahrajn",
"BD": "Bangladesz",
"BB": "Barbados",
"BE": "Belgia",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermudy",
"BT": "Bhutan",
"BY": "Białoruś",
"MM": "Birma",
"BO": "Boliwia",
"BW": "Botswana",
"BA": "Bośnia i Hercegowina",
"BR": "Brazylia",
"BN": "Brunei Darussalam",
"VG": "Brytyjskie Wyspy Dziewicze",
"BF": "Burkina Faso",
"BI": "Burundi",
"BG": "Bułgaria",
"CL": "Chile",
"CN": "Chiny",
"HR": "Chorwacja",
"CY": "Cypr",
"TD": "Czad",
"ME": "Czarnogóra",
"CZ": "Czechy",
"UM": "Dalekie Wyspy Mniejsze Stanów Zjednoczonych",
"DK": "Dania",
"CD": "Demokratyczna Republika Konga",
"DM": "Dominika",
"DJ": "Dżibuti",
"EG": "Egipt",
"EC": "Ekwador",
"ER": "Erytrea",
"EE": "Estonia",
"ET": "Etiopia",
"FK": "Falklandy",
"FM": "Federalne Stany Mikronezji",
"FJ": "Fidżi",
"PH": "Filipiny",
"FI": "Finlandia",
"FR": "Francja",
"TF": "Francuskie Terytoria Południowe",
"GA": "Gabon",
"GM": "Gambia",
"GS": "Georgia Południowa i Sandwich Południowy",
"GH": "Ghana",
"GI": "Gibraltar",
"GR": "Grecja",
"GD": "Grenada",
"GL": "Grenlandia",
"GE": "Gruzja",
"GU": "Guam",
"GY": "Gujana",
"GF": "Gujana Francuska",
"GP": "Gwadelupa",
"GT": "Gwatemala",
"GN": "Gwinea",
"GW": "Gwinea Bissau",
"GQ": "Gwinea Równikowa",
"HT": "Haiti",
"ES": "Hiszpania",
"NL": "Holandia",
"HN": "Honduras",
"HK": "Hongkong, Specjalny Region Administracyjny Chin",
"IN": "Indie",
"ID": "Indonezja",
"IQ": "Irak",
"IR": "Iran",
"IE": "Irlandia",
"IS": "Islandia",
"IL": "Izrael",
"JM": "Jamajka",
"JP": "Japonia",
"YE": "Jemen",
"JO": "Jordania",
"KY": "Kajmany",
"KH": "Kambodża",
"CM": "Kamerun",
"CA": "Kanada",
"QA": "Katar",
"KZ": "Kazachstan",
"KE": "Kenia",
"KG": "Kirgistan",
"KI": "Kiribati",
"CO": "Kolumbia",
"KM": "Komory",
"CG": "Kongo",
"KR": "Korea Południowa",
"KP": "Korea Północna",
"CR": "Kostaryka",
"CU": "Kuba",
"KW": "Kuwejt",
"LA": "Laos",
"LS": "Lesotho",
"LB": "Liban",
"LR": "Liberia",
"LY": "Libia",
"LI": "Liechtenstein",
"LT": "Litwa",
"LU": "Luksemburg",
"MK": "Macedonia",
"MG": "Madagaskar",
"YT": "Majotta",
"MO": "Makau, Specjalny Region Administracyjny Chin",
"MW": "Malawi",
"MV": "Malediwy",
"MY": "Malezja",
"ML": "Mali",
"MT": "Malta",
"MP": "Mariany Północne",
"MA": "Maroko",
"MQ": "Martynika",
"MR": "Mauretania",
"MU": "Mauritius",
"MX": "Meksyk",
"MC": "Monako",
"MN": "Mongolia",
"MS": "Montserrat",
"MZ": "Mozambik",
"MD": "Mołdawia",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"DE": "Niemcy",
"ZZ": "Nieznany lub nieprawidłowy region",
"NE": "Niger",
"NG": "Nigeria",
"NI": "Nikaragua",
"NU": "Niue",
"NF": "Norfolk",
"NO": "Norwegia",
"NC": "Nowa Kaledonia",
"NZ": "Nowa Zelandia",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PA": "Panama",
"PG": "Papua Nowa Gwinea",
"PY": "Paragwaj",
"PE": "Peru",
"PN": "Pitcairn",
"PF": "Polinezja Francuska",
"PL": "Polska",
"PR": "Portoryko",
"PT": "Portugalia",
"DO": "Republika Dominikańska",
"ZA": "Republika Południowej Afryki",
"CV": "Republika Zielonego Przylądka",
"CF": "Republika Środkowoafrykańska",
"RE": "Reunion",
"RU": "Rosja",
"RO": "Rumunia",
"RW": "Rwanda",
"EH": "Sahara Zachodnia",
"BL": "Saint Barthélemy",
"KN": "Saint Kitts i Nevis",
"LC": "Saint Lucia",
"VC": "Saint Vincent i Grenadyny",
"PM": "Saint-Pierre i Miquelon",
"SV": "Salwador",
"WS": "Samoa",
"AS": "Samoa Amerykańskie",
"SM": "San Marino",
"SN": "Senegal",
"RS": "Serbia",
"CS": "Serbia i Czarnogóra",
"SC": "Seszele",
"SL": "Sierra Leone",
"SG": "Singapur",
"MF": "Sint Maarten",
"SO": "Somalia",
"LK": "Sri Lanka",
"US": "Stany Zjednoczone",
"SZ": "Suazi",
"SD": "Sudan",
"SR": "Surinam",
"SJ": "Svalbard i Jan Mayen",
"SY": "Syria",
"CH": "Szwajcaria",
"SE": "Szwecja",
"SK": "Słowacja",
"SI": "Słowenia",
"TJ": "Tadżykistan",
"TH": "Tajlandia",
"TW": "Tajwan",
"TZ": "Tanzania",
"PS": "Terytoria Palestyńskie",
"IO": "Terytorium Brytyjskie Oceanu Indyjskiego",
"TL": "Timor Wschodni",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trynidad i Tobago",
"TN": "Tunezja",
"TR": "Turcja",
"TM": "Turkmenistan",
"TC": "Turks i Caicos",
"TV": "Tuvalu",
"UG": "Uganda",
"UA": "Ukraina",
"UY": "Urugwaj",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"WF": "Wallis i Futuna",
"VA": "Watykan",
"VE": "Wenezuela",
"GB": "Wielka Brytania",
"VN": "Wietnam",
"CI": "Wybrzeże Kości Słoniowej",
"BV": "Wyspa Bouveta",
"CX": "Wyspa Bożego Narodzenia",
"GG": "Wyspa Guernsey",
"JE": "Wyspa Jersey",
"IM": "Wyspa Man",
"SH": "Wyspa Świętej Heleny",
"AX": "Wyspy Alandzkie",
"CK": "Wyspy Cooka",
"VI": "Wyspy Dziewicze Stanów Zjednoczonych",
"HM": "Wyspy Heard i McDonalda",
"CC": "Wyspy Kokosowe",
"MH": "Wyspy Marshalla",
"FO": "Wyspy Owcze",
"SB": "Wyspy Salomona",
"ST": "Wyspy Świętego Tomasza i Książęca",
"HU": "Węgry",
"IT": "Włochy",
"ZM": "Zambia",
"ZW": "Zimbabwe",
"AE": "Zjednoczone Emiraty Arabskie",
"LV": "Łotwa"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afeganistão",
"AL": "Albânia",
"DE": "Alemanha",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AN": "Antilhas Holandesas",
"AQ": "Antártida",
"AG": "Antígua e Barbuda",
"AR": "Argentina",
"DZ": "Argélia",
"AM": "Armênia",
"AW": "Aruba",
"SA": "Arábia Saudita",
"AU": "Austrália",
"AZ": "Azerbaijão",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesh",
"BB": "Barbados",
"BY": "Belarus",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermudas",
"BO": "Bolívia",
"BW": "Botsuana",
"BR": "Brasil",
"BN": "Brunei",
"BG": "Bulgária",
"BF": "Burquina Faso",
"BI": "Burundi",
"BT": "Butão",
"BE": "Bélgica",
"BA": "Bósnia-Herzegovina",
"CV": "Cabo Verde",
"KH": "Camboja",
"CA": "Canadá",
"KZ": "Casaquistão",
"QA": "Catar",
"TD": "Chade",
"CL": "Chile",
"CN": "China",
"CY": "Chipre",
"SG": "Cingapura",
"CO": "Colômbia",
"KM": "Comores",
"CG": "Congo",
"CD": "Congo-Kinshasa",
"KP": "Coreia do Norte",
"KR": "Coreia do Sul",
"CR": "Costa Rica",
"CI": "Costa do Marfim",
"HR": "Croácia",
"CU": "Cuba",
"DK": "Dinamarca",
"DJ": "Djibuti",
"DM": "Dominica",
"EG": "Egito",
"SV": "El Salvador",
"AE": "Emirados Árabes Unidos",
"EC": "Equador",
"ER": "Eritreia",
"SK": "Eslováquia",
"SI": "Eslovênia",
"ES": "Espanha",
"US": "Estados Unidos",
"EE": "Estônia",
"ET": "Etiópia",
"FJ": "Fiji",
"PH": "Filipinas",
"FI": "Finlândia",
"FR": "França",
"GA": "Gabão",
"GH": "Gana",
"GE": "Geórgia",
"GS": "Geórgia do Sul e Ilhas Sandwich do Sul",
"GI": "Gibraltar",
"GD": "Granada",
"GL": "Groênlandia",
"GR": "Grécia",
"GP": "Guadalupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GY": "Guiana",
"GF": "Guiana Francesa",
"GN": "Guiné",
"GW": "Guiné Bissau",
"GQ": "Guiné Equatorial",
"GM": "Gâmbia",
"HT": "Haiti",
"NL": "Holanda",
"HN": "Honduras",
"HK": "Hong Kong, Região Admin. Especial da China",
"HU": "Hungria",
"BV": "Ilha Bouvet",
"HM": "Ilha Heard e Ilhas McDonald",
"NF": "Ilha Norfolk",
"IM": "Ilha de Man",
"AX": "Ilhas Aland",
"KY": "Ilhas Caiman",
"CC": "Ilhas Coco",
"CK": "Ilhas Cook",
"FO": "Ilhas Faroe",
"FK": "Ilhas Malvinas",
"MP": "Ilhas Marianas do Norte",
"MH": "Ilhas Marshall",
"UM": "Ilhas Menores Distantes dos Estados Unidos",
"CX": "Ilhas Natal",
"SB": "Ilhas Salomão",
"TC": "Ilhas Turks e Caicos",
"VG": "Ilhas Virgens Britânicas",
"VI": "Ilhas Virgens dos EUA",
"ID": "Indonésia",
"IQ": "Iraque",
"IE": "Irlanda",
"IR": "Irã",
"IS": "Islândia",
"IL": "Israel",
"IT": "Itália",
"YE": "Iêmen",
"JM": "Jamaica",
"JP": "Japão",
"JE": "Jersey",
"JO": "Jordânia",
"KW": "Kuwait",
"LS": "Lesoto",
"LV": "Letônia",
"LR": "Libéria",
"LI": "Liechtenstein",
"LT": "Lituânia",
"LU": "Luxemburgo",
"LB": "Líbano",
"LY": "Líbia",
"MO": "Macau, Região Admin. Especial da China",
"MK": "Macedônia",
"MG": "Madagascar",
"MW": "Malawi",
"MV": "Maldivas",
"ML": "Mali",
"MT": "Malta",
"MY": "Malásia",
"MA": "Marrocos",
"MQ": "Martinica",
"MR": "Mauritânia",
"MU": "Maurício",
"YT": "Mayotte",
"MM": "Mianmar",
"FM": "Micronésia",
"MD": "Moldávia",
"MN": "Mongólia",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Moçambique",
"MX": "México",
"MC": "Mônaco",
"NA": "Namíbia",
"NR": "Nauru",
"NP": "Nepal",
"NI": "Nicarágua",
"NG": "Nigéria",
"NU": "Niue",
"NO": "Noruega",
"NC": "Nova Caledônia",
"NZ": "Nova Zelândia",
"NE": "Níger",
"OM": "Omã",
"PW": "Palau",
"PA": "Panamá",
"PG": "Papua-Nova Guiné",
"PK": "Paquistão",
"PY": "Paraguai",
"PE": "Peru",
"PN": "Pitcairn",
"PF": "Polinésia Francesa",
"PL": "Polônia",
"PR": "Porto Rico",
"PT": "Portugal",
"KG": "Quirguistão",
"KI": "Quiribati",
"KE": "Quênia",
"ZZ": "Região desconhecida ou inválida",
"GB": "Reino Unido",
"CF": "República Centro-Africana",
"DO": "República Dominicana",
"LA": "República Popular Democrática do Laos",
"CZ": "República Tcheca",
"CM": "República dos Camarões",
"RE": "Reunião",
"RO": "Romênia",
"RW": "Ruanda",
"RU": "Rússia",
"EH": "Saara Ocidental",
"PM": "Saint Pierre e Miquelon",
"WS": "Samoa",
"AS": "Samoa Americana",
"SM": "San Marino",
"SH": "Santa Helena",
"LC": "Santa Lúcia",
"SN": "Senegal",
"SL": "Serra Leoa",
"SC": "Seychelles",
"SO": "Somália",
"LK": "Sri Lanka",
"SZ": "Suazilândia",
"SD": "Sudão",
"SR": "Suriname",
"SE": "Suécia",
"CH": "Suíça",
"SJ": "Svalbard e Jan Mayen",
"BL": "São Bartolomeu",
"KN": "São Cristovão e Nevis",
"MF": "São Martinho",
"ST": "São Tomé e Príncipe",
"VC": "São Vicente e Granadinas",
"RS": "Sérvia",
"CS": "Sérvia e Montenegro",
"SY": "Síria",
"TJ": "Tadjiquistão",
"TH": "Tailândia",
"TW": "Taiwan",
"TZ": "Tanzânia",
"IO": "Território Britânico do Oceano Índico",
"PS": "Território da Palestina",
"TF": "Territórios Franceses do Sul",
"TL": "Timor Leste",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad e Tobago",
"TN": "Tunísia",
"TM": "Turcomenistão",
"TR": "Turquia",
"TV": "Tuvalu",
"UA": "Ucrânia",
"UG": "Uganda",
"UY": "Uruguai",
"UZ": "Uzbequistão",
"VU": "Vanuatu",
"VA": "Vaticano",
"VE": "Venezuela",
"VN": "Vietnã",
"WF": "Wallis e Futuna",
"ZW": "Zimbábue",
"ZM": "Zâmbia",
"ZA": "África do Sul",
"AT": "Áustria",
"IN": "Índia"
}

View File

@ -0,0 +1,250 @@
{
"AU": "Австралия",
"AT": "Австрия",
"AZ": "Азербайджан",
"AX": "Аландские острова",
"AL": "Албания",
"DZ": "Алжир",
"VI": "Американские Виргинские острова",
"AS": "Американское Самоа",
"AO": "Ангола",
"AI": "Ангуилла",
"AD": "Андорра",
"AQ": "Антарктика",
"AG": "Антигуа и Барбуда",
"AR": "Аргентина",
"AM": "Армения",
"AW": "Аруба",
"AF": "Афганистан",
"BS": "Багамские острова",
"BD": "Бангладеш",
"BB": "Барбадос",
"BH": "Бахрейн",
"BY": "Беларусь",
"BZ": "Белиз",
"BE": "Бельгия",
"BJ": "Бенин",
"BM": "Бермудские Острова",
"BG": "Болгария",
"BO": "Боливия",
"BA": "Босния и Герцеговина",
"BW": "Ботсвана",
"BR": "Бразилия",
"IO": "Британская территория в Индийском океане",
"VG": "Британские Виргинские Острова",
"BN": "Бруней Даруссалам",
"BF": "Буркина Фасо",
"BI": "Бурунди",
"BT": "Бутан",
"VU": "Вануату",
"VA": "Ватикан",
"GB": "Великобритания",
"HU": "Венгрия",
"VE": "Венесуэла",
"UM": "Внешние малые острова (США)",
"TL": "Восточный Тимор",
"VN": "Вьетнам",
"GA": "Габон",
"HT": "Гаити",
"GY": "Гайана",
"GM": "Гамбия",
"GH": "Гана",
"GP": "Гваделупа",
"GT": "Гватемала",
"GN": "Гвинея",
"GW": "Гвинея-Биссау",
"DE": "Германия",
"GG": "Гернси",
"GI": "Гибралтар",
"HN": "Гондурас",
"HK": "Гонконг, Особый Административный Район Китая",
"GD": "Гренада",
"GL": "Гренландия",
"GR": "Греция",
"GE": "Грузия",
"GU": "Гуам",
"DK": "Дания",
"CD": "Демократическая Республика Конго",
"JE": "Джерси",
"DJ": "Джибути",
"DO": "Доминиканская Республика",
"EG": "Египет",
"ZM": "Замбия",
"EH": "Западная Сахара",
"ZW": "Зимбабве",
"IL": "Израиль",
"IN": "Индия",
"ID": "Индонезия",
"JO": "Иордания",
"IQ": "Ирак",
"IR": "Иран",
"IE": "Ирландия",
"IS": "Исландия",
"ES": "Испания",
"IT": "Италия",
"YE": "Йемен",
"KZ": "Казахстан",
"KY": "Каймановы острова",
"KH": "Камбоджа",
"CM": "Камерун",
"CA": "Канада",
"QA": "Катар",
"KE": "Кения",
"CY": "Кипр",
"KI": "Кирибати",
"CN": "Китай",
"CC": "Кокосовые острова",
"CO": "Колумбия",
"KM": "Коморские Острова",
"CG": "Конго",
"KP": "Корейская Народно-Демократическая Республика",
"CR": "Коста-Рика",
"CI": "Кот д’Ивуар",
"CU": "Куба",
"KW": "Кувейт",
"KG": "Кыргызстан",
"LA": "Лаос",
"LV": "Латвия",
"LS": "Лесото",
"LR": "Либерия",
"LB": "Ливан",
"LY": "Ливия",
"LT": "Литва",
"LI": "Лихтенштейн",
"LU": "Люксембург",
"MU": "Маврикий",
"MR": "Мавритания",
"MG": "Мадагаскар",
"YT": "Майотта",
"MO": "Макао (особый административный район КНР)",
"MK": "Македония",
"MW": "Малави",
"MY": "Малайзия",
"ML": "Мали",
"MV": "Мальдивы",
"MT": "Мальта",
"MA": "Марокко",
"MQ": "Мартиник",
"MH": "Маршалловы Острова",
"MX": "Мексика",
"MZ": "Мозамбик",
"MD": "Молдова",
"MC": "Монако",
"MN": "Монголия",
"MS": "Монсеррат",
"MM": "Мьянма",
"NA": "Намибия",
"NR": "Науру",
"ZZ": "Неизвестный или недействительный регион",
"NP": "Непал",
"NE": "Нигер",
"NG": "Нигерия",
"AN": "Нидерландские Антильские острова",
"NL": "Нидерланды",
"NI": "Никарагуа",
"NU": "Ниуе",
"NZ": "Новая Зеландия",
"NC": "Новая Каледония",
"NO": "Норвегия",
"AE": "Объединенные Арабские Эмираты",
"OM": "Оман",
"BV": "Остров Буве",
"DM": "Остров Доминика",
"IM": "Остров Мэн",
"NF": "Остров Норфолк",
"CX": "Остров Рождества",
"BL": "Остров Святого Бартоломея",
"MF": "Остров Святого Мартина",
"SH": "Остров Святой Елены",
"CV": "Острова Зеленого Мыса",
"CK": "Острова Кука",
"TC": "Острова Тёркс и Кайкос",
"HM": "Острова Херд и Макдональд",
"PK": "Пакистан",
"PW": "Палау",
"PS": "Палестинская автономия",
"PA": "Панама",
"PG": "Папуа-Новая Гвинея",
"PY": "Парагвай",
"PE": "Перу",
"PN": "Питкерн",
"PL": "Польша",
"PT": "Португалия",
"PR": "Пуэрто-Рико",
"KR": "Республика Корея",
"RE": "Реюньон",
"RU": "Россия",
"RW": "Руанда",
"RO": "Румыния",
"US": "США",
"SV": "Сальвадор",
"WS": "Самоа",
"SM": "Сан-Марино",
"ST": "Сан-Томе и Принсипи",
"SA": "Саудовская Аравия",
"SZ": "Свазиленд",
"SJ": "Свальбард и Ян-Майен",
"MP": "Северные Марианские Острова",
"SC": "Сейшельские Острова",
"PM": "Сен-Пьер и Микелон",
"SN": "Сенегал",
"VC": "Сент-Винсент и Гренадины",
"KN": "Сент-Киттс и Невис",
"LC": "Сент-Люсия",
"RS": "Сербия",
"CS": "Сербия и Черногория",
"SG": "Сингапур",
"SY": "Сирийская Арабская Республика",
"SK": "Словакия",
"SI": "Словения",
"SB": "Соломоновы Острова",
"SO": "Сомали",
"SD": "Судан",
"SR": "Суринам",
"SL": "Сьерра-Леоне",
"TJ": "Таджикистан",
"TH": "Таиланд",
"TW": "Тайвань",
"TZ": "Танзания",
"TG": "Того",
"TK": "Токелау",
"TO": "Тонга",
"TT": "Тринидад и Тобаго",
"TV": "Тувалу",
"TN": "Тунис",
"TM": "Туркменистан",
"TR": "Турция",
"UG": "Уганда",
"UZ": "Узбекистан",
"UA": "Украина",
"WF": "Уоллис и Футуна",
"UY": "Уругвай",
"FO": "Фарерские острова",
"FM": "Федеративные Штаты Микронезии",
"FJ": "Фиджи",
"PH": "Филиппины",
"FI": "Финляндия",
"FK": "Фолклендские острова",
"FR": "Франция",
"GF": "Французская Гвиана",
"PF": "Французская Полинезия",
"TF": "Французские Южные Территории",
"HR": "Хорватия",
"CF": "Центрально-Африканская Республика",
"TD": "Чад",
"ME": "Черногория",
"CZ": "Чешская республика",
"CL": "Чили",
"CH": "Швейцария",
"SE": "Швеция",
"LK": "Шри-Ланка",
"EC": "Эквадор",
"GQ": "Экваториальная Гвинея",
"ER": "Эритрея",
"EE": "Эстония",
"ET": "Эфиопия",
"ZA": "Южная Африка",
"GS": "Южная Джорджия и Южные Сандвичевы Острова",
"JM": "Ямайка",
"JP": "Япония"
}

View File

@ -0,0 +1,250 @@
{
"AF": "Afghanistan",
"AL": "Albanien",
"DZ": "Algeriet",
"VI": "Amerikanska Jungfruöarna",
"AS": "Amerikanska Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarktis",
"AG": "Antigua och Barbuda",
"AR": "Argentina",
"AM": "Armenien",
"AW": "Aruba",
"AU": "Australien",
"AZ": "Azerbajdzjan",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesh",
"BB": "Barbados",
"BE": "Belgien",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivia",
"BA": "Bosnien och Hercegovina",
"BW": "Botswana",
"BV": "Bouvetön",
"BR": "Brasilien",
"IO": "Brittiska Indiska oceanöarna",
"VG": "Brittiska Jungfruöarna",
"BN": "Brunei",
"BG": "Bulgarien",
"BF": "Burkina Faso",
"BI": "Burundi",
"KY": "Caymanöarna",
"CF": "Centralafrikanska republiken",
"CL": "Chile",
"CO": "Colombia",
"CK": "Cooköarna",
"CR": "Costa Rica",
"CY": "Cypern",
"DK": "Danmark",
"DJ": "Djibouti",
"DM": "Dominica",
"DO": "Dominikanska republiken",
"EC": "Ecuador",
"EG": "Egypten",
"GQ": "Ekvatorialguinea",
"SV": "El Salvador",
"CI": "Elfenbenskusten",
"ER": "Eritrea",
"EE": "Estland",
"ET": "Etiopien",
"FK": "Falklandsöarna",
"FJ": "Fiji",
"PH": "Filippinerna",
"FI": "Finland",
"FR": "Frankrike",
"GF": "Franska Guyana",
"PF": "Franska Polynesien",
"TF": "Franska Sydterritorierna",
"FO": "Färöarna",
"AE": "Förenade Arabemiraten",
"GA": "Gabon",
"GM": "Gambia",
"GE": "Georgien",
"GH": "Ghana",
"GI": "Gibraltar",
"GR": "Grekland",
"GD": "Grenada",
"GL": "Grönland",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HM": "Heard- och McDonaldöarna",
"HN": "Honduras",
"HK": "Hongkong (S.A.R. Kina)",
"IN": "Indien",
"ID": "Indonesien",
"IQ": "Irak",
"IR": "Iran",
"IE": "Irland",
"IS": "Island",
"IM": "Isle of Man",
"IL": "Israel",
"IT": "Italien",
"JM": "Jamaica",
"JP": "Japan",
"YE": "Jemen",
"JE": "Jersey",
"JO": "Jordanien",
"CX": "Julön",
"KH": "Kambodja",
"CM": "Kamerun",
"CA": "Kanada",
"CV": "Kap Verde",
"KZ": "Kazakstan",
"KE": "Kenya",
"CN": "Kina",
"KG": "Kirgizistan",
"KI": "Kiribati",
"CC": "Kokosöarna",
"KM": "Komorerna",
"CG": "Kongo-Brazzaville",
"CD": "Kongo-Kinshasa",
"HR": "Kroatien",
"CU": "Kuba",
"KW": "Kuwait",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Lettland",
"LB": "Libanon",
"LR": "Liberia",
"LY": "Libyen",
"LI": "Liechtenstein",
"LT": "Litauen",
"LU": "Luxemburg",
"MO": "Macao (S.A.R. Kina)",
"MG": "Madagaskar",
"MK": "Makedonien",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Maldiverna",
"ML": "Mali",
"MT": "Malta",
"MA": "Marocko",
"MH": "Marshallöarna",
"MQ": "Martinique",
"MR": "Mauretanien",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Mexiko",
"FM": "Mikronesien",
"MD": "Moldavien",
"MC": "Monaco",
"MN": "Mongoliet",
"ME": "Montenegro",
"MS": "Montserrat",
"MZ": "Moçambique",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NL": "Nederländerna",
"AN": "Nederländska Antillerna",
"NP": "Nepal",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"KP": "Nordkorea",
"MP": "Nordmarianerna",
"NF": "Norfolkön",
"NO": "Norge",
"NC": "Nya Kaledonien",
"NZ": "Nya Zeeland",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palestinska territoriet",
"PA": "Panama",
"PG": "Papua Nya Guinea",
"PY": "Paraguay",
"PE": "Peru",
"PN": "Pitcairn",
"PL": "Polen",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Qatar",
"RO": "Rumänien",
"RW": "Rwanda",
"RU": "Ryssland",
"RE": "Réunion",
"BL": "S:t Barthélemy",
"SH": "S:t Helena",
"KN": "S:t Kitts och Nevis",
"LC": "S:t Lucia",
"MF": "S:t Martin",
"PM": "S:t Pierre och Miquelon",
"VC": "S:t Vincent och Grenadinerna",
"SB": "Salomonöarna",
"WS": "Samoa",
"SM": "San Marino",
"SA": "Saudiarabien",
"CH": "Schweiz",
"SN": "Senegal",
"RS": "Serbien",
"CS": "Serbien och Montenegro",
"SC": "Seychellerna",
"SL": "Sierra Leone",
"SG": "Singapore",
"SK": "Slovakien",
"SI": "Slovenien",
"SO": "Somalia",
"ES": "Spanien",
"LK": "Sri Lanka",
"GB": "Storbritannien",
"SD": "Sudan",
"SR": "Surinam",
"SJ": "Svalbard och Jan Mayen",
"SE": "Sverige",
"SZ": "Swaziland",
"ZA": "Sydafrika",
"GS": "Sydgeorgien och Södra Sandwichöarna",
"KR": "Sydkorea",
"SY": "Syrien",
"ST": "São Tomé och Príncipe",
"TJ": "Tadzjikistan",
"TW": "Taiwan",
"TZ": "Tanzania",
"TD": "Tchad",
"TH": "Thailand",
"CZ": "Tjeckien",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad och Tobago",
"TN": "Tunisien",
"TR": "Turkiet",
"TM": "Turkmenistan",
"TC": "Turks- och Caicosöarna",
"TV": "Tuvalu",
"DE": "Tyskland",
"US": "USA",
"UM": "USA:s yttre öar",
"UG": "Uganda",
"UA": "Ukraina",
"HU": "Ungern",
"UY": "Uruguay",
"UZ": "Uzbekistan",
"VU": "Vanuatu",
"VA": "Vatikanstaten",
"VE": "Venezuela",
"VN": "Vietnam",
"BY": "Vitryssland",
"EH": "Västsahara",
"WF": "Wallis- och Futunaöarna",
"ZM": "Zambia",
"ZW": "Zimbabwe",
"ZZ": "okänd eller ogiltig regionkod",
"AX": "Åland",
"AT": "Österrike",
"TL": "Östtimor"
}

View File

@ -0,0 +1,250 @@
{
"VI": "ABD Virgin Adaları",
"AF": "Afganistan",
"AX": "Aland Adaları",
"DE": "Almanya",
"US": "Amerika Birleşik Devletleri",
"UM": "Amerika Birleşik Devletleri Küçük Dış Adaları",
"AS": "Amerikan Samoası",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarktika",
"AG": "Antigua ve Barbuda",
"AR": "Arjantin",
"AL": "Arnavutluk",
"AW": "Aruba",
"AU": "Avustralya",
"AT": "Avusturya",
"AZ": "Azerbaycan",
"BS": "Bahamalar",
"BH": "Bahreyn",
"BD": "Bangladeş",
"BB": "Barbados",
"EH": "Batı Sahara",
"BZ": "Belize",
"BE": "Belçika",
"BJ": "Benin",
"BM": "Bermuda",
"BY": "Beyaz Rusya",
"BT": "Bhutan",
"ZZ": "Bilinmeyen veya Geçersiz Bölge",
"AE": "Birleşik Arap Emirlikleri",
"GB": "Birleşik Krallık",
"BO": "Bolivya",
"BA": "Bosna Hersek",
"BW": "Botsvana",
"BV": "Bouvet Adası",
"BR": "Brezilya",
"BN": "Brunei",
"BG": "Bulgaristan",
"BF": "Burkina Faso",
"BI": "Burundi",
"CV": "Cape Verde",
"KY": "Cayman Adaları",
"GI": "Cebelitarık",
"DZ": "Cezayir",
"CX": "Christmas Adası",
"DJ": "Cibuti",
"CC": "Cocos Adaları",
"CK": "Cook Adaları",
"DK": "Danimarka",
"DO": "Dominik Cumhuriyeti",
"DM": "Dominika",
"TL": "Doğu Timor",
"EC": "Ekvador",
"GQ": "Ekvator Ginesi",
"SV": "El Salvador",
"ID": "Endonezya",
"ER": "Eritre",
"AM": "Ermenistan",
"EE": "Estonya",
"ET": "Etiyopya",
"FK": "Falkland Adaları",
"FO": "Faroe Adaları",
"MA": "Fas",
"FJ": "Fiji",
"CI": "Fildişi Sahili",
"PH": "Filipinler",
"PS": "Filistin Bölgesi",
"FI": "Finlandiya",
"FR": "Fransa",
"GF": "Fransız Guyanası",
"TF": "Fransız Güney Bölgeleri",
"PF": "Fransız Polinezyası",
"GA": "Gabon",
"GM": "Gambiya",
"GH": "Gana",
"GN": "Gine",
"GW": "Gine-Bissau",
"GD": "Grenada",
"GL": "Grönland",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GY": "Guyana",
"ZA": "Güney Afrika",
"GS": "Güney Georgia ve Güney Sandwich Adaları",
"KR": "Güney Kore",
"CY": "Güney Kıbrıs Rum Kesimi",
"GE": "Gürcistan",
"HT": "Haiti",
"HM": "Heard Adası ve McDonald Adaları",
"IN": "Hindistan",
"IO": "Hint Okyanusu İngiliz Bölgesi",
"NL": "Hollanda",
"AN": "Hollanda Antilleri",
"HN": "Honduras",
"HK": "Hong Kong SAR - Çin",
"HR": "Hırvatistan",
"IQ": "Irak",
"JM": "Jamaika",
"JP": "Japonya",
"JE": "Jersey",
"KH": "Kamboçya",
"CM": "Kamerun",
"CA": "Kanada",
"ME": "Karadağ",
"QA": "Katar",
"KZ": "Kazakistan",
"KE": "Kenya",
"KI": "Kiribati",
"CO": "Kolombiya",
"KM": "Komorlar",
"CG": "Kongo - Brazavil",
"CD": "Kongo - Kinşasa",
"CR": "Kosta Rika",
"KW": "Kuveyt",
"KP": "Kuzey Kore",
"MP": "Kuzey Mariana Adaları",
"CU": "Küba",
"KG": "Kırgızistan",
"LA": "Laos",
"LS": "Lesotho",
"LV": "Letonya",
"LR": "Liberya",
"LY": "Libya",
"LI": "Liechtenstein",
"LT": "Litvanya",
"LB": "Lübnan",
"LU": "Lüksemburg",
"HU": "Macaristan",
"MG": "Madagaskar",
"MO": "Makao S.A.R. Çin",
"MK": "Makedonya",
"MW": "Malavi",
"MV": "Maldivler",
"MY": "Malezya",
"ML": "Mali",
"MT": "Malta",
"IM": "Man Adası",
"MH": "Marshall Adaları",
"MQ": "Martinik",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Meksika",
"FM": "Mikronezya Federal Eyaletleri",
"MD": "Moldova",
"MC": "Monako",
"MS": "Montserrat",
"MR": "Moritanya",
"MZ": "Mozambik",
"MN": "Moğolistan",
"MM": "Myanmar",
"EG": "Mısır",
"NA": "Namibya",
"NR": "Nauru",
"NP": "Nepal",
"NE": "Nijer",
"NG": "Nijerya",
"NI": "Nikaragua",
"NU": "Niue",
"NF": "Norfolk Adası",
"NO": "Norveç",
"CF": "Orta Afrika Cumhuriyeti",
"PK": "Pakistan",
"PW": "Palau",
"PA": "Panama",
"PG": "Papua Yeni Gine",
"PY": "Paraguay",
"PE": "Peru",
"PN": "Pitcairn",
"PL": "Polonya",
"PT": "Portekiz",
"PR": "Porto Riko",
"RE": "Reunion",
"RO": "Romanya",
"RW": "Ruanda",
"RU": "Rusya Federasyonu",
"BL": "Saint Barthelemy",
"SH": "Saint Helena",
"KN": "Saint Kitts ve Nevis",
"LC": "Saint Lucia",
"MF": "Saint Martin",
"PM": "Saint Pierre ve Miquelon",
"VC": "Saint Vincent ve Grenadinler",
"WS": "Samoa",
"SM": "San Marino",
"ST": "Sao Tome ve Principe",
"SN": "Senegal",
"SC": "Seyşel Adaları",
"SL": "Sierra Leone",
"SG": "Singapur",
"SK": "Slovakya",
"SI": "Slovenya",
"SB": "Solomon Adaları",
"SO": "Somali",
"LK": "Sri Lanka",
"SD": "Sudan",
"SR": "Surinam",
"SY": "Suriye",
"SA": "Suudi Arabistan",
"SJ": "Svalbard ve Jan Mayen",
"SZ": "Svaziland",
"RS": "Sırbistan",
"CS": "Sırbistan-Karadağ",
"TJ": "Tacikistan",
"TZ": "Tanzanya",
"TH": "Tayland",
"TW": "Tayvan",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad ve Tobago",
"TN": "Tunus",
"TC": "Turks ve Caicos Adaları",
"TV": "Tuvalu",
"TR": "Türkiye",
"TM": "Türkmenistan",
"UG": "Uganda",
"UA": "Ukrayna",
"OM": "Umman",
"UY": "Uruguay",
"VU": "Vanuatu",
"VA": "Vatikan",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis ve Futuna",
"YE": "Yemen",
"NC": "Yeni Kaledonya",
"NZ": "Yeni Zelanda",
"GR": "Yunanistan",
"ZM": "Zambiya",
"ZW": "Zimbabve",
"TD": "Çad",
"CZ": "Çek Cumhuriyeti",
"CN": "Çin",
"UZ": "Özbekistan",
"JO": "Ürdün",
"VG": "İngiliz Virgin Adaları",
"IR": "İran",
"IE": "İrlanda",
"ES": "İspanya",
"IL": "İsrail",
"SE": "İsveç",
"CH": "İsviçre",
"IT": "İtalya",
"IS": "İzlanda",
"CL": "Şili"
}

View File

@ -0,0 +1,250 @@
{
"BT": "不丹",
"TL": "东帝汶",
"CN": "中国",
"MO": "中国澳门特别行政区",
"HK": "中国香港特别行政区",
"CF": "中非共和国",
"DK": "丹麦",
"UA": "乌克兰",
"UZ": "乌兹别克斯坦",
"UG": "乌干达",
"UY": "乌拉圭",
"TD": "乍得",
"YE": "也门",
"AM": "亚美尼亚",
"IL": "以色列",
"IQ": "伊拉克",
"IR": "伊朗",
"BZ": "伯利兹",
"CV": "佛得角",
"RU": "俄罗斯",
"BG": "保加利亚",
"HR": "克罗地亚",
"GU": "关岛",
"GM": "冈比亚",
"IS": "冰岛",
"GN": "几内亚",
"GW": "几内亚比绍",
"LI": "列支敦士登",
"CG": "刚果(布)",
"CD": "刚果(金)",
"LY": "利比亚",
"LR": "利比里亚",
"CA": "加拿大",
"GH": "加纳",
"GA": "加蓬",
"HU": "匈牙利",
"MP": "北马里亚纳群岛",
"GS": "南乔治亚岛和南桑威齐群岛",
"AQ": "南极洲",
"ZA": "南非",
"BW": "博茨瓦纳",
"QA": "卡塔尔",
"RW": "卢旺达",
"LU": "卢森堡",
"IN": "印度",
"ID": "印度尼西亚",
"GT": "危地马拉",
"EC": "厄瓜多尔",
"ER": "厄立特里亚",
"SY": "叙利亚",
"CU": "古巴",
"TW": "台湾",
"KG": "吉尔吉斯斯坦",
"DJ": "吉布提",
"KZ": "哈萨克斯坦",
"CO": "哥伦比亚",
"CR": "哥斯达黎加",
"CM": "喀麦隆",
"TV": "图瓦卢",
"TM": "土库曼斯坦",
"TR": "土耳其",
"LC": "圣卢西亚",
"KN": "圣基茨和尼维斯",
"ST": "圣多美和普林西比",
"BL": "圣巴泰勒米",
"VC": "圣文森特和格林纳丁斯",
"PM": "圣皮埃尔和密克隆",
"CX": "圣诞岛",
"SH": "圣赫勒拿",
"MF": "圣马丁",
"SM": "圣马力诺",
"GY": "圭亚那",
"TZ": "坦桑尼亚",
"EG": "埃及",
"ET": "埃塞俄比亚",
"KI": "基里巴斯",
"TJ": "塔吉克斯坦",
"SN": "塞内加尔",
"RS": "塞尔维亚",
"CS": "塞尔维亚和黑山",
"SL": "塞拉利昂",
"CY": "塞浦路斯",
"SC": "塞舌尔群岛",
"MX": "墨西哥",
"TG": "多哥",
"DM": "多米尼加",
"DO": "多米尼加共和国",
"AX": "奥兰群岛",
"AT": "奥地利",
"VE": "委内瑞拉",
"BD": "孟加拉国",
"AO": "安哥拉",
"AI": "安圭拉",
"AG": "安提瓜和巴布达",
"AD": "安道尔",
"FM": "密克罗尼西亚联邦",
"NI": "尼加拉瓜",
"NG": "尼日利亚",
"NE": "尼日尔",
"NP": "尼泊尔",
"PS": "巴勒斯坦领土",
"BS": "巴哈马",
"PK": "巴基斯坦",
"BB": "巴巴多斯",
"PG": "巴布亚新几内亚",
"PY": "巴拉圭",
"PA": "巴拿马",
"BH": "巴林",
"BR": "巴西",
"BF": "布基纳法索",
"BV": "布维特岛",
"BI": "布隆迪",
"GR": "希腊",
"PW": "帕劳",
"CK": "库克群岛",
"KY": "开曼群岛",
"DE": "德国",
"IT": "意大利",
"SB": "所罗门群岛",
"TK": "托克劳",
"LV": "拉脱维亚",
"NO": "挪威",
"CZ": "捷克共和国",
"MD": "摩尔多瓦",
"MA": "摩洛哥",
"MC": "摩纳哥",
"BN": "文莱",
"FJ": "斐济",
"SZ": "斯威士兰",
"SK": "斯洛伐克",
"SI": "斯洛文尼亚",
"SJ": "斯瓦尔巴特和扬马延",
"LK": "斯里兰卡",
"SG": "新加坡",
"NC": "新喀里多尼亚",
"NZ": "新西兰",
"JP": "日本",
"CL": "智利",
"IM": "曼岛",
"KP": "朝鲜",
"ZZ": "未知或无效地区",
"KH": "柬埔寨",
"GG": "格恩西岛",
"GD": "格林纳达",
"GL": "格陵兰",
"GE": "格鲁吉亚",
"VA": "梵蒂冈",
"BE": "比利时",
"MR": "毛里塔尼亚",
"MU": "毛里求斯",
"TO": "汤加",
"SA": "沙特阿拉伯",
"FR": "法国",
"TF": "法属南部领土",
"GF": "法属圭亚那",
"PF": "法属波利尼西亚",
"FO": "法罗群岛",
"PL": "波兰",
"PR": "波多黎各",
"BA": "波斯尼亚和黑塞哥维那",
"TH": "泰国",
"JE": "泽西岛",
"ZW": "津巴布韦",
"HN": "洪都拉斯",
"HT": "海地",
"AU": "澳大利亚",
"IE": "爱尔兰",
"EE": "爱沙尼亚",
"JM": "牙买加",
"TC": "特克斯和凯科斯群岛",
"TT": "特立尼达和多巴哥",
"BO": "玻利维亚",
"NR": "瑙鲁",
"SE": "瑞典",
"CH": "瑞士",
"GP": "瓜德罗普岛",
"WF": "瓦利斯和富图纳",
"VU": "瓦努阿图",
"RE": "留尼汪",
"BY": "白俄罗斯",
"BM": "百慕大",
"PN": "皮特凯恩",
"GI": "直布罗陀",
"FK": "福克兰群岛",
"KW": "科威特",
"KM": "科摩罗",
"CC": "科科斯群岛",
"PE": "秘鲁",
"TN": "突尼斯",
"LT": "立陶宛",
"SO": "索马里",
"JO": "约旦",
"NA": "纳米比亚",
"NU": "纽埃",
"MM": "缅甸",
"RO": "罗马尼亚",
"US": "美国",
"UM": "美国边远小岛",
"VI": "美属维京群岛",
"AS": "美属萨摩亚",
"LA": "老挝人民民主共和国",
"KE": "肯尼亚",
"FI": "芬兰",
"SD": "苏丹",
"SR": "苏里南",
"GB": "英国",
"IO": "英属印度洋领地",
"VG": "英属维京群岛",
"NL": "荷兰",
"AN": "荷属安的列斯群岛",
"MZ": "莫桑比克",
"LS": "莱索托",
"PH": "菲律宾",
"SV": "萨尔瓦多",
"WS": "萨摩亚",
"PT": "葡萄牙",
"MN": "蒙古",
"MS": "蒙塞拉特群岛",
"EH": "西撒哈拉",
"ES": "西班牙",
"NF": "诺福克岛",
"CI": "象牙海岸",
"BJ": "贝宁",
"ZM": "赞比亚",
"GQ": "赤道几内亚",
"HM": "赫德与麦克唐纳群岛",
"VN": "越南",
"AZ": "阿塞拜疆",
"AF": "阿富汗",
"DZ": "阿尔及利亚",
"AL": "阿尔巴尼亚",
"AE": "阿拉伯联合酋长国",
"OM": "阿曼",
"AR": "阿根廷",
"AW": "阿鲁巴",
"KR": "韩国",
"MK": "马其顿",
"MV": "马尔代夫",
"MW": "马拉维",
"MQ": "马提尼克群岛",
"MY": "马来西亚",
"YT": "马约特",
"MH": "马绍尔群岛",
"MT": "马耳他",
"MG": "马达加斯加",
"ML": "马里",
"LB": "黎巴嫩",
"ME": "黑山共和国"
}

View File

@ -0,0 +1,250 @@
{
"BT": "不丹",
"CN": "中華人民共和國",
"MO": "中華人民共和國澳門特別行政區",
"HK": "中華人民共和國香港特別行政區",
"CF": "中非共和國",
"DK": "丹麥",
"AZ": "亞塞拜然",
"AM": "亞美尼亞",
"AX": "亞蘭群島",
"IL": "以色列",
"IQ": "伊拉克",
"IR": "伊朗",
"RU": "俄羅斯",
"BG": "保加利亞",
"HR": "克羅埃西亞",
"IS": "冰島",
"SJ": "冷岸及央麥恩群島",
"LI": "列支敦斯登",
"LY": "利比亞",
"CG": "剛果",
"CD": "剛果民主共和國",
"GA": "加彭",
"CA": "加拿大",
"HU": "匈牙利",
"KP": "北韓",
"MP": "北馬里亞納群島",
"TT": "千里達及托巴哥",
"GS": "南喬治亞與南三明治群島",
"AQ": "南極洲",
"ZA": "南非",
"KR": "南韓",
"QA": "卡達",
"ID": "印尼",
"IN": "印度",
"ER": "厄利垂亞",
"EC": "厄瓜多",
"CU": "古巴",
"CC": "可可斯群島",
"TW": "台灣",
"SZ": "史瓦濟蘭",
"DJ": "吉布地",
"KG": "吉爾吉斯",
"KI": "吉里巴斯",
"TV": "吐瓦魯",
"KZ": "哈薩克",
"CO": "哥倫比亞",
"GP": "哥德普洛",
"CR": "哥斯大黎加",
"CM": "喀麥隆",
"GE": "喬治亞共和國",
"TC": "土克斯及開科斯群島",
"TM": "土庫曼",
"TR": "土耳其",
"TZ": "坦尚尼亞",
"EG": "埃及",
"TJ": "塔吉克",
"SN": "塞內加爾",
"SC": "塞席爾",
"RS": "塞爾維亞",
"CS": "塞爾維亞和蒙特尼哥羅",
"MX": "墨西哥",
"TG": "多哥共和國",
"DM": "多明尼加",
"DO": "多明尼加共和國",
"NG": "奈及利亞",
"AT": "奧地利",
"VE": "委內瑞拉",
"BD": "孟加拉",
"AO": "安哥拉",
"AI": "安圭拉島",
"AG": "安地卡及巴布達",
"AD": "安道爾",
"HN": "宏都拉斯",
"FM": "密克羅尼西亞群島",
"LA": "寮國",
"ZM": "尚比亞",
"NI": "尼加拉瓜",
"NE": "尼日",
"NP": "尼泊爾",
"PS": "巴勒斯坦",
"BS": "巴哈馬",
"PK": "巴基斯坦",
"PG": "巴布亞紐幾內亞",
"PY": "巴拉圭",
"PA": "巴拿馬",
"BH": "巴林",
"BR": "巴西",
"BB": "巴貝多",
"BF": "布吉納法索",
"BV": "布威島",
"GR": "希臘",
"PW": "帛琉",
"GN": "幾內亞",
"GW": "幾內亞比索",
"CK": "庫克群島",
"DE": "德國",
"EE": "愛沙尼亞",
"IE": "愛爾蘭",
"TK": "托克勞群島",
"LV": "拉脫維亞",
"NO": "挪威",
"CZ": "捷克共和國",
"MA": "摩洛哥",
"MD": "摩爾多瓦",
"MC": "摩納哥",
"SY": "敘利亞",
"FJ": "斐濟",
"SK": "斯洛伐克",
"SI": "斯洛維尼亞",
"LK": "斯里蘭卡",
"SG": "新加坡",
"NC": "新喀里多尼亞群島",
"JP": "日本",
"CL": "智利",
"IM": "曼島",
"ZZ": "未確定的區域",
"TO": "東加",
"TL": "東帝汶",
"TD": "查德",
"KH": "柬埔寨",
"GG": "根西島",
"GD": "格瑞納達",
"GL": "格陵蘭",
"VA": "梵蒂岡",
"MU": "模里西斯",
"BE": "比利時",
"BN": "汶萊",
"SA": "沙烏地阿拉伯",
"FR": "法國",
"TF": "法屬南方屬地",
"GF": "法屬圭亞那",
"PF": "法屬玻里尼西亞",
"FO": "法羅群島",
"BA": "波士尼亞與赫塞格維納",
"PR": "波多黎各",
"BW": "波札那",
"PL": "波蘭",
"TH": "泰國",
"HT": "海地",
"JE": "澤西島",
"AU": "澳洲",
"UA": "烏克蘭",
"UG": "烏干達",
"UY": "烏拉圭",
"UZ": "烏茲別克",
"JM": "牙買加",
"SL": "獅子山",
"BO": "玻利維亞",
"SE": "瑞典",
"CH": "瑞士",
"GT": "瓜地馬拉",
"WF": "瓦利斯和福杜納群島",
"GM": "甘比亞",
"RE": "留尼旺",
"BY": "白俄羅斯",
"BM": "百慕達",
"PN": "皮特康",
"RW": "盧安達",
"LU": "盧森堡",
"GI": "直布羅陀",
"FK": "福克蘭群島",
"KW": "科威特",
"KM": "科摩羅群島",
"CI": "科特迪瓦",
"PE": "秘魯",
"TN": "突尼西亞",
"LT": "立陶宛",
"JO": "約旦",
"NA": "納米比亞",
"NU": "紐威島",
"NZ": "紐西蘭",
"SB": "索羅門群島",
"SO": "索馬利亞",
"CV": "維德角",
"MM": "緬甸",
"RO": "羅馬尼亞",
"US": "美國",
"VI": "美屬維京群島",
"AS": "美屬薩摩亞群島",
"UM": "美屬邊疆群島",
"IT": "義大利",
"KN": "聖克里斯多福及尼維斯",
"ST": "聖多美及普林西比",
"BL": "聖巴瑟米",
"PM": "聖彼德與密啟崙",
"VC": "聖文森及格瑞那丁",
"CX": "聖誕島",
"SH": "聖赫勒拿島",
"LC": "聖露西亞",
"MF": "聖馬丁",
"SM": "聖馬利諾",
"KE": "肯亞",
"FI": "芬蘭",
"GB": "英國",
"IO": "英屬印度洋領土",
"VG": "英屬維京群島",
"MR": "茅利塔尼亞",
"AN": "荷屬安地列斯",
"NL": "荷蘭",
"MZ": "莫三比克",
"PH": "菲律賓",
"VU": "萬那杜",
"YE": "葉門",
"PT": "葡萄牙",
"MN": "蒙古",
"ME": "蒙特內哥羅",
"MS": "蒙特色拉特島",
"BI": "蒲隆地",
"GY": "蓋亞納",
"WS": "薩摩亞群島",
"SV": "薩爾瓦多",
"SD": "蘇丹",
"SR": "蘇利南",
"ET": "衣索比亞",
"EH": "西撒哈拉",
"ES": "西班牙",
"NF": "諾福克島",
"NR": "諾魯",
"BJ": "貝南",
"BZ": "貝里斯",
"LR": "賴比瑞亞",
"LS": "賴索扥",
"CY": "賽普勒斯",
"GQ": "赤道幾內亞",
"HM": "赫德與麥克當諾群島",
"VN": "越南",
"ZW": "辛巴威",
"GH": "迦納",
"KY": "開曼群島",
"GU": "關島",
"AF": "阿富汗",
"AE": "阿拉伯聯合大公國",
"OM": "阿曼王國",
"AR": "阿根廷",
"DZ": "阿爾及利亞",
"AL": "阿爾巴尼亞",
"AW": "阿路巴",
"MQ": "馬丁尼克島",
"MY": "馬來西亞",
"MK": "馬其頓",
"ML": "馬利",
"MW": "馬拉威",
"MT": "馬爾他",
"MV": "馬爾地夫",
"YT": "馬約特",
"MH": "馬紹爾群島",
"MG": "馬達加斯加",
"LB": "黎巴嫩"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
{
"application/epub_zip": "EPUB ebook",
"application/msword": "Word document",
"application/pdf": "PDF document",
"application/vnd.moodle.backup": "Moodle backup",
"application/vnd.ms-excel": "Excel spreadsheet",
"application/vnd.ms-excel.sheet.macroEnabled.12": "Excel 2007 macro-enabled workbook",
"application/vnd.ms-powerpoint": "Powerpoint presentation",
"application/vnd.oasis.opendocument.spreadsheet": "OpenDocument Spreadsheet",
"application/vnd.oasis.opendocument.spreadsheet-template": "OpenDocument Spreadsheet template",
"application/vnd.oasis.opendocument.text": "OpenDocument Text document",
"application/vnd.oasis.opendocument.text-template": "OpenDocument Text template",
"application/vnd.oasis.opendocument.text-web": "OpenDocument Web page template",
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "Powerpoint 2007 presentation",
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "Powerpoint 2007 slideshow",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "Excel 2007 spreadsheet",
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "Excel 2007 template",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "Word 2007 document",
"application/x-iwork-keynote-sffkey": "iWork Keynote presentation",
"application/x-iwork-numbers-sffnumbers": "iWork Numbers spreadsheet",
"application/x-iwork-pages-sffpages": "iWork Pages document",
"application/x-javascript": "JavaScript source",
"application/x-mspublisher": "Publisher document",
"application/x-shockwave-flash": "Flash animation",
"application/xhtml_xml": "XHTML document",
"archive": "Archive ({{$a.EXT}})",
"audio": "Audio file ({{$a.EXT}})",
"default": "{{$a.mimetype}}",
"document/unknown": "File",
"group:archive": "Archive files",
"group:audio": "Audio files",
"group:document": "Document files",
"group:html_audio": "Audio files natively supported by browsers",
"group:html_track": "HTML track files",
"group:html_video": "Video files natively supported by browsers",
"group:image": "Image files",
"group:presentation": "Presentation files",
"group:sourcecode": "Source code",
"group:spreadsheet": "Spreadsheet files",
"group:video": "Video files",
"group:web_audio": "Audio files used on the web",
"group:web_file": "Web files",
"group:web_image": "Image files used on the web",
"group:web_video": "Video files used on the web",
"image": "Image ({{$a.MIMETYPE2}})",
"image/vnd.microsoft.icon": "Windows icon",
"text/css": "Cascading Style-Sheet",
"text/csv": "Comma-separated values",
"text/html": "HTML document",
"text/plain": "Text file",
"text/rtf": "RTF document",
"text/vtt": "Web Video Text Track",
"video": "Video file ({{$a.EXT}})"
}

View File

@ -0,0 +1,27 @@
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* Static class to contain all the core constants.
*/
export class CoreConstants {
public static secondsYear = 31536000;
public static secondsDay = 86400;
public static secondsHour = 3600;
public static secondsMinute = 60;
public static wifiDownloadThreshold = 104857600; // 100MB.
public static downloadThreshold = 10485760; // 10MB.
public static dontShowError = 'CoreDontShowError';
public static settingsRichTextEditor = 'CoreSettingsRichTextEditor';
}

View File

@ -22,6 +22,7 @@ import { Network } from '@ionic-native/network';
import { ClipboardMock } from './providers/clipboard'; import { ClipboardMock } from './providers/clipboard';
import { GlobalizationMock } from './providers/globalization'; import { GlobalizationMock } from './providers/globalization';
import { NetworkMock } from './providers/network'; import { NetworkMock } from './providers/network';
import { InAppBrowser } from '@ionic-native/in-app-browser';
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -52,7 +53,8 @@ import { NetworkMock } from './providers/network';
// Use platform instead of CoreAppProvider to prevent circular dependencies. // Use platform instead of CoreAppProvider to prevent circular dependencies.
return platform.is('cordova') ? new Network() : new NetworkMock(); return platform.is('cordova') ? new Network() : new NetworkMock();
} }
} },
InAppBrowser
] ]
}) })
export class CoreEmulatorModule { export class CoreEmulatorModule {

View File

@ -150,6 +150,7 @@
"now" : "now", "now" : "now",
"numwords": "{{$a}} words", "numwords": "{{$a}} words",
"offline": "Offline", "offline": "Offline",
"ok": "OK",
"online": "Online", "online": "Online",
"openfullimage": "Click here to display the image at full size", "openfullimage": "Click here to display the image at full size",
"openinbrowser": "Open in browser", "openinbrowser": "Open in browser",

View File

@ -0,0 +1,830 @@
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Injectable } from '@angular/core';
import { LoadingController, Loading, ToastController, Toast, AlertController, Alert, Platform } from 'ionic-angular';
import { TranslateService } from '@ngx-translate/core';
import { CoreTextUtilsProvider } from './text';
import { CoreAppProvider } from '../app';
import { CoreConfigProvider } from '../config';
import { CoreUrlUtilsProvider } from './url';
import { CoreConstants } from '../../core/constants';
/*
* "Utils" service with helper functions for UI, DOM elements and HTML code.
*/
@Injectable()
export class CoreDomUtilsProvider {
element = document.createElement('div'); // Fake element to use in some functions, to prevent re-creating it each time.
matchesFn: string; // Name of the "matches" function to use when simulating a closest call.
inputSupportKeyboard = ['date', 'datetime', 'datetime-local', 'email', 'month', 'number', 'password',
'search', 'tel', 'text', 'time', 'url', 'week'];
constructor(private translate: TranslateService, private loadingCtrl: LoadingController, private toastCtrl: ToastController,
private alertCtrl: AlertController, private textUtils: CoreTextUtilsProvider, private appProvider: CoreAppProvider,
private platform: Platform, private configProvider: CoreConfigProvider, private urlUtils: CoreUrlUtilsProvider) {}
/**
* Wraps a message with mm-format-text if the message contains HTML tags.
*
* @param {string} message Message to wrap.
* @return {string} Result message.
*/
private addFormatTextIfNeeded(message: string) : string {
if (this.textUtils.hasHTMLTags(message)) {
return '<mm-format-text watch="true">' + message + '</mm-format-text>';
}
return message;
}
/**
* Equivalent to element.closest(). If the browser doesn't support element.closest, it will
* traverse the parents to achieve the same functionality.
* Returns the closest ancestor of the current element (or the current element itself) which matches the selector.
*
* @param {HTMLElement} element DOM Element.
* @param {string} selector Selector to search.
* @return {Element} Closest ancestor.
*/
closest(element: HTMLElement, selector: string) : Element {
// Try to use closest if the browser supports it.
if (typeof element.closest == 'function') {
return element.closest(selector);
}
if (!this.matchesFn) {
// Find the matches function supported by the browser.
['matches','webkitMatchesSelector','mozMatchesSelector','msMatchesSelector','oMatchesSelector'].some((fn) => {
if (typeof document.body[fn] == 'function') {
this.matchesFn = fn;
return true;
}
return false;
});
if (!this.matchesFn) {
return;
}
}
// Traverse parents.
while (element) {
if (element[this.matchesFn](selector)) {
return element;
}
element = element.parentElement;
}
}
/**
* If the download size is higher than a certain threshold shows a confirm dialog.
*
* @param {any} size Object containing size to download and a boolean to indicate if its totally or partialy calculated.
* @param {string} [message] Code of the message to show. Default: 'mm.course.confirmdownload'.
* @param {string} [unknownMessage] ID of the message to show if size is unknown.
* @param {number} [wifiThreshold] Threshold to show confirm in WiFi connection. Default: CoreWifiDownloadThreshold.
* @param {number} [limitedThreshold] Threshold to show confirm in limited connection. Default: CoreDownloadThreshold.
* @return {Promise<void>} Promise resolved when the user confirms or if no confirm needed.
*/
confirmDownloadSize(size: any, message?: string, unknownMessage?: string, wifiThreshold?: number, limitedThreshold?: number)
: Promise<void> {
wifiThreshold = typeof wifiThreshold == 'undefined' ? CoreConstants.wifiDownloadThreshold : wifiThreshold;
limitedThreshold = typeof limitedThreshold == 'undefined' ? CoreConstants.downloadThreshold : limitedThreshold;
if (size.size < 0 || (size.size == 0 && !size.total)) {
// Seems size was unable to be calculated. Show a warning.
unknownMessage = unknownMessage || 'mm.course.confirmdownloadunknownsize';
return this.showConfirm(this.translate.instant(unknownMessage));
} else if (!size.total) {
// Filesize is only partial.
let readableSize = this.textUtils.bytesToSize(size.size, 2);
return this.showConfirm(this.translate.instant('mm.course.confirmpartialdownloadsize', {size: readableSize}));
} else if (size.size >= wifiThreshold || (this.appProvider.isNetworkAccessLimited() && size.size >= limitedThreshold)) {
message = message || 'mm.course.confirmdownload';
let readableSize = this.textUtils.bytesToSize(size.size, 2);
return this.showConfirm(this.translate.instant(message, {size: readableSize}));
}
return Promise.resolve();
}
/**
* Extract the downloadable URLs from an HTML code.
*
* @param {string} html HTML code.
* @return {string[]} List of file urls.
*/
extractDownloadableFilesFromHtml(html: string) : string[] {
let elements,
urls = [];
this.element.innerHTML = html;
elements = this.element.querySelectorAll('a, img, audio, video, source, track');
for (let i in elements) {
let element = elements[i],
url = element.tagName === 'A' ? element.href : element.src;
if (url && this.urlUtils.isDownloadableUrl(url) && urls.indexOf(url) == -1) {
urls.push(url);
}
// Treat video poster.
if (element.tagName == 'VIDEO' && element.getAttribute('poster')) {
url = element.getAttribute('poster');
if (url && this.urlUtils.isDownloadableUrl(url) && urls.indexOf(url) == -1) {
urls.push(url);
}
}
}
return urls;
}
/**
* Extract the downloadable URLs from an HTML code and returns them in fake file objects.
*
* @param {string} html HTML code.
* @return {any[]} List of fake file objects with file URLs.
*/
extractDownloadableFilesFromHtmlAsFakeFileObjects(html: string) : any[] {
let urls = this.extractDownloadableFilesFromHtml(html);
// Convert them to fake file objects.
return urls.map((url) => {
return {
fileurl: url
};
});
}
/**
* Search all the URLs in a CSS file content.
*
* @param {string} code CSS code.
* @return {string[]} List of URLs.
*/
extractUrlsFromCSS(code: string) : string[] {
// First of all, search all the url(...) occurrences that don't include "data:".
let urls = [],
matches = code.match(/url\(\s*["']?(?!data:)([^)]+)\)/igm);
// Extract the URL form each match.
matches.forEach((match) => {
let submatches = match.match(/url\(\s*['"]?([^'"]*)['"]?\s*\)/im);
if (submatches && submatches[1]) {
urls.push(submatches[1]);
}
});
return urls;
}
/**
* Focus an element and open keyboard.
*
* @param {HTMLElement} el HTML element to focus.
*/
focusElement(el: HTMLElement) : void {
if (el && el.focus) {
el.focus();
if (this.platform.is('android') && this.supportsInputKeyboard(el)) {
// On some Android versions the keyboard doesn't open automatically.
this.appProvider.openKeyboard();
}
}
}
/**
* Formats a size to be used as width/height of an element.
* If the size is already valid (like '500px' or '50%') it won't be modified.
* Returned size will have a format like '500px'.
*
* @param {any} size Size to format.
* @return {string} Formatted size. If size is not valid, returns an empty string.
*/
formatPixelsSize(size: any) : string {
if (typeof size == 'string' && (size.indexOf('px') > -1 || size.indexOf('%') > -1)) {
// It seems to be a valid size.
return size;
}
size = parseInt(size, 10);
if (!isNaN(size)) {
return size + 'px';
}
return '';
}
/**
* Returns the contents of a certain selection in a DOM element.
*
* @param {HTMLElement} element DOM element to search in.
* @param {string} selector Selector to search.
* @return {string} Selection contents. Undefined if not found.
*/
getContentsOfElement(element: HTMLElement, selector: string) : string {
if (element) {
let selected = element.querySelector(selector);
if (selected) {
return selected.innerHTML;
}
}
}
/**
* Returns height of an element.
*
* @param {any} element DOM element to measure.
* @param {boolean} [usePadding] Whether to use padding to calculate the measure.
* @param {boolean} [useMargin] Whether to use margin to calculate the measure.
* @param {boolean} [useBorder] Whether to use borders to calculate the measure.
* @param {boolean} [innerMeasure] If inner measure is needed: padding, margin or borders will be substracted.
* @return {number} Height in pixels.
*/
getElementHeight(element: any, usePadding?: boolean, useMargin?: boolean, useBorder?: boolean,
innerMeasure?: boolean) : number {
return this.getElementMeasure(element, false, usePadding, useMargin, useBorder, innerMeasure);
}
/**
* Returns height or width of an element.
*
* @param {any} element DOM element to measure.
* @param {boolean} [isWidth] Whether to get width or height.
* @param {boolean} [usePadding] Whether to use padding to calculate the measure.
* @param {boolean} [useMargin] Whether to use margin to calculate the measure.
* @param {boolean} [useBorder] Whether to use borders to calculate the measure.
* @param {boolean} [innerMeasure] If inner measure is needed: padding, margin or borders will be substracted.
* @return {number} Measure in pixels.
*/
getElementMeasure(element: any, getWidth?: boolean, usePadding?: boolean, useMargin?: boolean, useBorder?: boolean,
innerMeasure?: boolean) : number {
let offsetMeasure = getWidth ? 'offsetWidth' : 'offsetHeight',
measureName = getWidth ? 'width' : 'height',
clientMeasure = getWidth ? 'clientWidth' : 'clientHeight',
priorSide = getWidth ? 'Left' : 'Top',
afterSide = getWidth ? 'Right' : 'Bottom',
measure = element[offsetMeasure] || element[measureName] || element[clientMeasure] || 0;
// Measure not correctly taken.
if (measure <= 0) {
let style = getComputedStyle(element);
if (style && style.display == '') {
element.style.display = 'inline-block';
measure = element[offsetMeasure] || element[measureName] || element[clientMeasure] || 0;
element.style.display = '';
}
}
if (usePadding || useMargin || useBorder) {
let surround = 0,
computedStyle = getComputedStyle(element);
if (usePadding) {
surround += parseInt(computedStyle['padding' + priorSide], 10) + parseInt(computedStyle['padding' + afterSide], 10);
}
if (useMargin) {
surround += parseInt(computedStyle['margin' + priorSide], 10) + parseInt(computedStyle['margin' + afterSide], 10);
}
if (useBorder) {
surround += parseInt(computedStyle['border' + priorSide], 10) + parseInt(computedStyle['border' + afterSide], 10);
}
if (innerMeasure) {
measure = measure > surround ? measure - surround : 0;
} else {
measure += surround;
}
}
return measure;
}
/**
* Returns width of an element.
*
* @param {any} element DOM element to measure.
* @param {boolean} [usePadding] Whether to use padding to calculate the measure.
* @param {boolean} [useMargin] Whether to use margin to calculate the measure.
* @param {boolean} [useBorder] Whether to use borders to calculate the measure.
* @param {boolean} [innerMeasure] If inner measure is needed: padding, margin or borders will be substracted.
* @return {number} Width in pixels.
*/
getElementWidth(element: any, usePadding?: boolean, useMargin?: boolean, useBorder?: boolean,
innerMeasure?: boolean) : number {
return this.getElementMeasure(element, true, usePadding, useMargin, useBorder, innerMeasure);
}
/**
* Retrieve the position of a element relative to another element.
*
* @param {HTMLElement} container Element to search in.
* @param {string} [selector] Selector to find the element to gets the position.
* @param {string} [positionParentClass] Parent Class where to stop calculating the position. Default scroll-content.
* @return {number[]} positionLeft, positionTop of the element relative to.
*/
getElementXY(container: HTMLElement, selector?: string, positionParentClass?: string) : number[] {
let element: HTMLElement = <HTMLElement> (selector ? container.querySelector(selector) : container),
offsetElement,
positionTop = 0,
positionLeft = 0;
if (!positionParentClass) {
positionParentClass = 'scroll-content';
}
if (!element) {
return null;
}
while (element) {
positionLeft += (element.offsetLeft - element.scrollLeft + element.clientLeft);
positionTop += (element.offsetTop - element.scrollTop + element.clientTop);
offsetElement = element.offsetParent;
element = element.parentElement;
// Every parent class has to be checked but the position has to be got form offsetParent.
while (offsetElement != element && element) {
// If positionParentClass element is reached, stop adding tops.
if (element.className.indexOf(positionParentClass) != -1) {
element = null;
} else {
element = element.parentElement;
}
}
// Finally, check again.
if (element.className.indexOf(positionParentClass) != -1) {
element = null;
}
}
return [positionLeft, positionTop];
}
/**
* Given an error message, return a suitable error title.
*
* @param {string} message The error message.
* @return {string} Title.
*/
private getErrorTitle(message: string) : string {
if (message == this.translate.instant('mm.core.networkerrormsg') ||
message == this.translate.instant('mm.fileuploader.errormustbeonlinetoupload')) {
return '<span class="mm-icon-with-badge"><i class="icon ion-wifi"></i>\
<i class="icon ion-alert-circled mm-icon-badge"></i></span>';
}
return this.textUtils.decodeHTML(this.translate.instant('mm.core.error'));
}
/**
* Check if an element is outside of screen (viewport).
*
* @param {HTMLElement} scrollEl The element that must be scrolled.
* @param {HTMLElement} element DOM element to check.
* @return {boolean} Whether the element is outside of the viewport.
*/
isElementOutsideOfScreen(scrollEl: HTMLElement, element: HTMLElement) : boolean {
let elementRect = element.getBoundingClientRect(),
elementMidPoint,
scrollElRect,
scrollTopPos = 0;
if (!elementRect) {
return false;
}
elementMidPoint = Math.round((elementRect.bottom + elementRect.top) / 2);
scrollElRect = scrollEl.getBoundingClientRect();
scrollTopPos = (scrollElRect && scrollElRect.top) || 0;
return elementMidPoint > window.innerHeight || elementMidPoint < scrollTopPos;
}
/**
* Check if rich text editor is enabled.
*
* @return {Promise<boolean>} Promise resolved with boolean: true if enabled, false otherwise.
*/
isRichTextEditorEnabled() : Promise<boolean> {
if (this.isRichTextEditorSupported()) {
return this.configProvider.get(CoreConstants.settingsRichTextEditor, true);
}
return Promise.resolve(false);
}
/**
* Check if rich text editor is supported in the platform.
*
* @return {boolean} Whether it's supported.
*/
isRichTextEditorSupported() : boolean {
// Disabled just for iOS.
return !this.platform.is('ios');
}
/**
* Search and remove a certain element from inside another element.
*
* @param {HTMLElement} element DOM element to search in.
* @param {string} selector Selector to search.
*/
removeElement(element: HTMLElement, selector: string) : void {
if (element) {
let selected = element.querySelector(selector);
if (selected) {
selected.remove();
}
}
}
/**
* Search and remove a certain element from an HTML code.
*
* @param {string} html HTML code to change.
* @param {string} selector Selector to search.
* @param {boolean} [removeAll] True if it should remove all matches found, false if it should only remove the first one.
* @return {string} HTML without the element.
*/
removeElementFromHtml(html: string, selector: string, removeAll?: boolean) : string {
let selected;
this.element.innerHTML = html;
if (removeAll) {
selected = this.element.querySelectorAll(selector);
for (let i in selected) {
selected[i].remove();
}
} else {
selected = this.element.querySelector(selector);
if (selected) {
selected.remove();
}
}
return this.element.innerHTML;
}
/**
* Search for certain classes in an element contents and replace them with the specified new values.
*
* @param {HTMLElement} element DOM element.
* @param {any} map Mapping of the classes to replace. Keys must be the value to replace, values must be
* the new class name. Example: {'correct': 'mm-question-answer-correct'}.
*/
replaceClassesInElement(element: HTMLElement, map: any) : void {
for (let key in map) {
let foundElements = element.querySelectorAll('.' + key);
for (let i in foundElements) {
let foundElement = foundElements[i];
foundElement.className = foundElement.className.replace(key, map[key]);
}
}
}
/**
* Given an HTML, search all links and media and tries to restore original sources using the paths object.
*
* @param {string} html HTML code.
* @param {object} paths Object linking URLs in the html code with the real URLs to use.
* @param {Function} [anchorFn] Function to call with each anchor. Optional.
* @return {string} Treated HTML code.
*/
restoreSourcesInHtml(html: string, paths: object, anchorFn?: Function) : string {
let media,
anchors;
this.element.innerHTML = html;
// Treat elements with src (img, audio, video, ...).
media = this.element.querySelectorAll('img, video, audio, source, track');
for (let i in media) {
let el = media[i],
newSrc = paths[this.textUtils.decodeURIComponent(el.getAttribute('src'))];
if (typeof newSrc != 'undefined') {
el.setAttribute('src', newSrc);
}
// Treat video posters.
if (el.tagName == 'VIDEO' && el.getAttribute('poster')) {
newSrc = paths[this.textUtils.decodeURIComponent(el.getAttribute('poster'))];
if (typeof newSrc !== 'undefined') {
el.setAttribute('poster', newSrc);
}
}
}
// Now treat links.
anchors = this.element.querySelectorAll('a');
for (let i in anchors) {
let anchor = anchors[i],
href = this.textUtils.decodeURIComponent(anchor.getAttribute('href')),
newUrl = paths[href];
if (typeof newUrl != 'undefined') {
anchor.setAttribute('href', newUrl);
if (typeof anchorFn == 'function') {
anchorFn(anchor, href);
}
}
}
return this.element.innerHTML;
}
/**
* Scroll to a certain element inside another element.
*
* @param {HTMLElement} scrollEl The element that must be scrolled.
* @param {HTMLElement} container Element to search in.
* @param {string} [selector] Selector to find the element to scroll to. If not defined, scroll to the container.
* @param {string} [scrollParentClass] Parent class where to stop calculating the position. Default scroll-content.
* @return {boolean} True if the element is found, false otherwise.
*/
scrollToElement(scrollEl: HTMLElement, container: HTMLElement, selector?: string, scrollParentClass?: string) : boolean {
let position = this.getElementXY(container, selector, scrollParentClass);
if (!position) {
return false;
}
scrollEl.scrollTo(position[0], position[1]);
return true;
}
/**
* Search for an input with error (mm-input-error directive) and scrolls to it if found.
*
* @param {HTMLElement} scrollEl The element that must be scrolled.
* @param {HTMLElement} container Element to search in.
* @param [scrollParentClass] Parent class where to stop calculating the position. Default scroll-content.
* @return {boolean} True if the element is found, false otherwise.
*/
scrollToInputError(scrollEl: HTMLElement, container: HTMLElement, scrollParentClass?: string) : boolean {
// @todo
return true;
// Wait an instant to make sure errors are shown and scroll to the element.
// return $timeout(function() {
// if (!scrollDelegate) {
// scrollDelegate = $ionicScrollDelegate;
// }
// scrollDelegate.resize();
// return self.scrollToElement(container, '.mm-input-has-errors', scrollDelegate, scrollParentClass);
// }, 100);
}
/**
* Show an alert modal with a button to close it.
*
* @param {string} title Title to show.
* @param {string} message Message to show.
* @param {string} [buttonText] Text of the button.
* @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed.
* @return {Alert} The alert modal.
*/
showAlert(title: string, message: string, buttonText?: string, autocloseTime?: number) : Alert {
let alert = this.alertCtrl.create({
title: title,
message: this.addFormatTextIfNeeded(message), // Add format-text to handle links.
buttons: [buttonText || this.translate.instant('mm.core.ok')]
});
alert.present();
if (autocloseTime > 0) {
setTimeout(() => {
alert.dismiss();
}, autocloseTime);
}
return alert;
}
/**
* Show an alert modal with a button to close it, translating the values supplied.
*
* @param {string} title Title to show.
* @param {string} message Message to show.
* @param {string} [buttonText] Text of the button.
* @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed.
* @return {Alert} The alert modal.
*/
showAlertTranslated(title: string, message: string, buttonText?: string, autocloseTime?: number) : Alert {
title = title ? this.translate.instant(title) : title;
message = message ? this.translate.instant(message) : message;
buttonText = buttonText ? this.translate.instant(buttonText) : buttonText;
return this.showAlert(title, message, buttonText, autocloseTime);
}
/**
* Show a confirm modal.
*
* @param {string} message Message to show in the modal body.
* @param {string} [title] Title of the modal.
* @param {string} [okText] Text of the OK button.
* @param {string} [cancelText] Text of the Cancel button.
* @param {any} [options] More options. See https://ionicframework.com/docs/api/components/alert/AlertController/
* @return {Promise<void>} Promise resolved if the user confirms and rejected if he cancels.
*/
showConfirm(message: string, title?: string, okText?: string, cancelText?: string, options?: any) : Promise<void> {
return new Promise<void>((resolve, reject) => {
options = options || {};
options.message = this.addFormatTextIfNeeded(message); // Add format-text to handle links.
options.title = title;
if (!title) {
options.cssClass = 'mm-nohead';
}
options.buttons = [
{
text: cancelText || this.translate.instant('mm.core.cancel'),
role: 'cancel',
handler: () => {
reject();
}
},
{
text: okText || this.translate.instant('mm.core.ok'),
handler: () => {
resolve();
}
}
];
this.alertCtrl.create(options).present();
});
}
/**
* Show an alert modal with an error message.
*
* @param {any} error Message to show.
* @param {boolean} [needsTranslate] Whether the error needs to be translated.
* @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed.
* @return {Alert} The alert modal.
*/
showErrorModal(error: any, needsTranslate?: boolean, autocloseTime?: number) : Alert {
if (typeof error == 'object') {
// We received an object instead of a string. Search for common properties.
if (typeof error.content != 'undefined') {
error = error.content;
} else if (typeof error.body != 'undefined') {
error = error.body;
} else if (typeof error.message != 'undefined') {
error = error.message;
} else if (typeof error.error != 'undefined') {
error = error.error;
} else {
// No common properties found, just stringify it.
error = JSON.stringify(error);
}
// Try to remove tokens from the contents.
let matches = error.match(/token"?[=|:]"?(\w*)/, '');
if (matches && matches[1]) {
error = error.replace(new RegExp(matches[1], 'g'), 'secret');
}
}
let message = this.textUtils.decodeHTML(needsTranslate ? this.translate.instant(error) : error);
return this.showAlert(this.getErrorTitle(message), message, null, autocloseTime);
}
/**
* Show an alert modal with an error message. It uses a default message if error is not a string.
*
* @param {any} error Message to show.
* @param {any} [defaultError] Message to show if the error is not a string.
* @param {boolean} [needsTranslate] Whether the error needs to be translated.
* @param {number} [autocloseTime] Number of milliseconds to wait to close the modal. If not defined, modal won't be closed.
* @return {Alert} The alert modal.
*/
showErrorModalDefault(error: any, defaultError: any, needsTranslate?: boolean, autocloseTime?: number) : Alert {
if (error != CoreConstants.dontShowError) {
error = typeof error == 'string' ? error : defaultError;
return this.showErrorModal(error, needsTranslate, autocloseTime);
}
}
/**
* Displays a loading modal window.
*
* @param {string} [text] The text of the modal window. Default: mm.core.loading.
* @param {boolean} [needsTranslate] Whether the 'text' needs to be translated.
* @return {Loading} Loading modal instance.
* @description
* Usage:
* let modal = domUtils.showModalLoading(myText);
* ...
* modal.dismiss();
*/
showModalLoading(text?: string, needsTranslate?: boolean) : Loading {
if (!text) {
text = this.translate.instant('mm.core.loading');
} else if (needsTranslate) {
text = this.translate.instant(text);
}
let loader = this.loadingCtrl.create({
content: text
});
loader.present();
return loader;
}
/**
* Show a prompt modal to input some data.
*
* @param {string} message Modal message.
* @param {string} [title] Modal title.
* @param {string} [placeholder] Placeholder of the input element. By default, "Password".
* @param {string} [type] Type of the input element. By default, password.
* @return {Promise<any>} Promise resolved with the input data if the user clicks OK, rejected if cancels.
*/
showPrompt(message: string, title?: string, placeholder?: string, type = 'password') : Promise<any> {
return new Promise((resolve, reject) => {
this.alertCtrl.create({
message: this.addFormatTextIfNeeded(message), // Add format-text to handle links.
title: title,
inputs: [
{
name: 'promptinput',
placeholder: placeholder || this.translate.instant('mm.login.password'),
type: type
}
],
buttons: [
{
text: this.translate.instant('mm.core.cancel'),
role: 'cancel',
handler: () => {
reject();
}
},
{
text: this.translate.instant('mm.core.ok'),
handler: (data) => {
resolve(data.promptinput);
}
}
]
}).present();
});
}
/**
* Displays an autodimissable toast modal window.
*
* @param {string} text The text of the toast.
* @param {boolean} [needsTranslate] Whether the 'text' needs to be translated.
* @param {number} [duration=2000] Duration in ms of the dimissable toast.
* @return {Toast} Toast instance.
*/
showToast(text: string, needsTranslate?: boolean, duration = 2000) : Toast {
if (needsTranslate) {
text = this.translate.instant(text);
}
let loader = this.toastCtrl.create({
message: text,
duration: duration,
position: 'bottom',
dismissOnPageChange: true
});
loader.present();
return loader;
}
/**
* Check if an element supports input via keyboard.
*
* @param {any} el HTML element to check.
* @return {boolean} Whether it supports input using keyboard.
*/
supportsInputKeyboard(el: any) : boolean {
return el && !el.disabled && (el.tagName.toLowerCase() == 'textarea' ||
(el.tagName.toLowerCase() == 'input' && this.inputSupportKeyboard.indexOf(el.type) != -1));
}
}

View File

@ -0,0 +1,471 @@
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { CoreLoggerProvider } from '../logger';
import { TranslateService } from '@ngx-translate/core';
import { CoreTextUtilsProvider } from './text';
/*
* "Utils" service with helper functions for mimetypes and extensions.
*/
@Injectable()
export class CoreMimetypeUtilsProvider {
logger;
extToMime = {}; // Object to map extensions -> mimetypes.
mimeToExt = {}; // Object to map mimetypes -> extensions.
groupsMimeInfo = {}; // Object to hold extensions and mimetypes that belong to a certain "group" (audio, video, ...).
extensionRegex = /^[a-z0-9]+$/;
wsProvider: any = {}; // @todo
constructor(http: HttpClient, logger: CoreLoggerProvider, private translate: TranslateService,
private textUtils: CoreTextUtilsProvider) {
this.logger = logger.getInstance('CoreMimetypeUtilsProvider');
http.get('assets/exttomime.json').subscribe((result) => {
this.extToMime = result;
}, (err) => {
// Error, shouldn't happen.
});
http.get('assets/mimetoext.json').subscribe((result) => {
this.mimeToExt = result;
}, (err) => {
// Error, shouldn't happen.
});
}
/**
* Check if a file extension can be embedded without using iframes.
*
* @param {string} extension Extension.
* @return {boolean} Whether it can be embedded.
*/
canBeEmbedded(extension: string) : boolean {
return this.isExtensionInGroup(extension, ['web_image', 'web_video', 'web_audio']);
}
/**
* Clean a extension, removing the dot, hash, extra params...
*
* @param {string} extension Extension to clean.
* @return {string} Clean extension.
*/
cleanExtension(extension: string) : string {
if (!extension) {
return extension;
}
// If the extension has parameters, remove them.
let position = extension.indexOf('?');
if (position > -1) {
extension = extension.substr(0, position);
}
// Remove hash in extension if there's any (added by filepool).
extension = extension.replace(/_.{32}$/, '');
// Remove dot from the extension if found.
if (extension && extension[0] == '.') {
extension = extension.substr(1);
}
return extension;
}
/**
* Fill the mimetypes and extensions info for a certain group.
*
* @param {string} group Group name.
*/
protected fillGroupMimeInfo(group: string) : void {
let mimetypes = {}, // Use an object to prevent duplicates.
extensions = []; // Extensions are unique.
for (let extension in this.extToMime) {
let data = this.extToMime[extension];
if (data.type && data.groups && data.groups.indexOf(group) != -1) {
// This extension has the group, add it to the list.
mimetypes[data.type] = true;
extensions.push(extension);
}
}
this.groupsMimeInfo[group] = {
mimetypes: Object.keys(mimetypes),
extensions: extensions
};
}
/**
* Get the extension of a mimetype. Returns undefined if not found.
*
* @param {string} mimetype Mimetype.
* @param {string} [url] URL of the file. It will be used if there's more than one possible extension.
* @return {string} Extension.
*/
getExtension(mimetype: string, url?: string) : string {
mimetype = mimetype || '';
mimetype = mimetype.split(';')[0]; // Remove codecs from the mimetype if any.
if (mimetype == 'application/x-forcedownload' || mimetype == 'application/forcedownload') {
// Couldn't get the right mimetype, try to guess it.
return this.guessExtensionFromUrl(url);
}
let extensions = this.mimeToExt[mimetype];
if (extensions && extensions.length) {
if (extensions.length > 1 && url) {
// There's more than one possible extension. Check if the URL has extension.
let candidate = this.guessExtensionFromUrl(url);
if (extensions.indexOf(candidate) != -1) {
return candidate;
}
}
return extensions[0];
}
}
/**
* Get the "type" (string) of an extension, something like "image", "video" or "audio".
*
* @param {string} extension Extension.
* @return {string} Type of the extension.
*/
getExtensionType(extension: string) : string {
extension = this.cleanExtension(extension);
if (this.extToMime[extension] && this.extToMime[extension].string) {
return this.extToMime[extension].string;
}
}
/**
* Get all the possible extensions of a mimetype. Returns empty array if not found.
*
* @param {string} mimetype Mimetype.
* @return {string[]} Extensions.
*/
getExtensions(mimetype: string) : string[] {
mimetype = mimetype || '';
mimetype = mimetype.split(';')[0]; // Remove codecs from the mimetype if any.
return this.mimeToExt[mimetype] || [];
}
/**
* Get a file icon URL based on its file name.
*
* @param {string} The name of the file.
* @return {string} The path to a file icon.
*/
getFileIcon(filename: string) : string {
let ext = this.getFileExtension(filename),
icon = 'unknown';
if (ext && this.extToMime[ext]) {
if (this.extToMime[ext].icon) {
icon = this.extToMime[ext].icon;
} else {
let type = this.extToMime[ext].type.split('/')[0];
if (type == 'video' || type == 'text' || type == 'image' || type == 'document' || type == 'audio') {
icon = type;
}
}
}
return 'img/files/' + icon + '-64.png';
}
/**
* Get the folder icon URL.
*
* @return {string} The path to a folder icon.
*/
getFolderIcon() : string {
return 'img/files/folder-64.png';
}
/**
* Get the mimetype of a file given its URL. It'll try to guess it using the URL, if that fails then it'll
* perform a HEAD request to get it. It's done in this order because pluginfile.php can return wrong mimetypes.
*
* @param {string} url The URL of the file.
* @return {Promise<string>} Promise resolved with the mimetype.
*/
getMimeTypeFromUrl(url: string) : Promise<string> {
// First check if it can be guessed from the URL.
let extension = this.guessExtensionFromUrl(url),
mimetype = this.getMimeType(extension);
if (mimetype) {
return Promise.resolve(mimetype);
}
// Can't be guessed, get the remote mimetype.
return this.wsProvider.getRemoteFileMimeType(url).then((mimetype) => {
return mimetype || '';
});
}
/**
* Guess the extension of a file from its URL.
* This is very weak and unreliable.
*
* @param {string} fileUrl The file URL.
* @return {string} The lowercased extension without the dot, or undefined.
*/
guessExtensionFromUrl(fileUrl: string) : string {
let split = fileUrl.split('.'),
candidate,
extension,
position;
if (split.length > 1) {
candidate = split.pop().toLowerCase();
// Remove params if any.
position = candidate.indexOf('?');
if (position > -1) {
candidate = candidate.substr(0, position);
}
if (this.extensionRegex.test(candidate)) {
extension = candidate;
}
}
// Check extension corresponds to a mimetype to know if it's valid.
if (extension && typeof this.getMimeType(extension) == 'undefined') {
this.logger.warn('Guess file extension: Not valid extension ' + extension);
return;
}
return extension;
}
/**
* Returns the file extension of a file.
* When the file does not have an extension, it returns undefined.
*
* @param {string} filename The file name.
* @return {string} The lowercased extension, or undefined.
*/
getFileExtension(filename: string) : string {
let dot = filename.lastIndexOf("."),
ext;
if (dot > -1) {
ext = filename.substr(dot + 1).toLowerCase();
ext = this.cleanExtension(ext);
// Check extension corresponds to a mimetype to know if it's valid.
if (typeof this.getMimeType(ext) == 'undefined') {
this.logger.warn('Get file extension: Not valid extension ' + ext);
return;
}
}
return ext;
}
/**
* Get the mimetype/extension info belonging to a certain group.
*
* @param {string} group Group name.
* @param {string} [field] The field to get. If not supplied, all the info will be returned.
* @return {any} Info for the group.
*/
getGroupMimeInfo(group: string, field?: string) : any {
if (typeof this.groupsMimeInfo[group] == 'undefined') {
this.fillGroupMimeInfo(group);
}
if (field) {
return this.groupsMimeInfo[group][field];
}
return this.groupsMimeInfo[group];
}
/**
* Get the mimetype of an extension. Returns undefined if not found.
*
* @param {string} extension Extension.
* @return {string} Mimetype.
*/
getMimeType(extension: string) : string {
extension = this.cleanExtension(extension);
if (this.extToMime[extension] && this.extToMime[extension].type) {
return this.extToMime[extension].type;
}
}
/**
* Obtains descriptions for file types (e.g. 'Microsoft Word document') from the language file.
* Based on Moodle's get_mimetype_description.
*
* @param {any} obj Instance of FileEntry OR object with 'filename' and 'mimetype' OR string with mimetype.
* @param {boolean} [capitalise] If true, capitalises first character of result.
* @return {string} Type description.
*/
getMimetypeDescription(obj: any, capitalise?: boolean) : string {
let filename = '',
mimetype = '',
extension = '',
langPrefix = 'mm.core.mimetype-';
if (typeof obj == 'object' && typeof obj.file == 'function') {
// It's a FileEntry. Don't use the file function because it's asynchronous and the type isn't reliable.
filename = obj.name;
} else if (typeof obj == 'object') {
filename = obj.filename || '';
mimetype = obj.mimetype || '';
} else {
mimetype = obj;
}
if (filename) {
extension = this.getFileExtension(filename);
if (!mimetype) {
// Try to calculate the mimetype using the extension.
mimetype = this.getMimeType(extension);
}
}
if (!mimetype) {
// Don't have the mimetype, stop.
return '';
}
if (!extension) {
extension = this.getExtension(mimetype);
}
let mimetypeStr = this.getMimetypeType(mimetype) || '',
chunks = mimetype.split('/'),
attr = {
mimetype: mimetype,
ext: extension || '',
mimetype1: chunks[0],
mimetype2: chunks[1] || '',
},
translateParams = {};
for (let key in attr) {
let value = attr[key];
translateParams[key] = value;
translateParams[key.toUpperCase()] = value.toUpperCase();
translateParams[this.textUtils.ucFirst(key)] = this.textUtils.ucFirst(value);
}
// MIME types may include + symbol but this is not permitted in string ids.
let safeMimetype = mimetype.replace(/\+/g, '_'),
safeMimetypeStr = mimetypeStr.replace(/\+/g, '_'),
safeMimetypeTrns = this.translate.instant(langPrefix + safeMimetype, {$a: translateParams}),
safeMimetypeStrTrns = this.translate.instant(langPrefix + safeMimetypeStr, {$a: translateParams}),
defaultTrns = this.translate.instant(langPrefix + 'default', {$a: translateParams}),
result = mimetype;
if (safeMimetypeTrns != langPrefix + safeMimetype) {
result = safeMimetypeTrns;
} else if (safeMimetypeStrTrns != langPrefix + safeMimetypeStr) {
result = safeMimetypeStrTrns;
} else if (defaultTrns != langPrefix + 'default') {
result = defaultTrns;
}
if (capitalise) {
result = this.textUtils.ucFirst(result);
}
return result;
}
/**
* Get the "type" (string) of a mimetype, something like "image", "video" or "audio".
*
* @param {string} mimetype Mimetype.
* @return {string} Type of the mimetype.
*/
getMimetypeType(mimetype: string) : string {
mimetype = mimetype.split(';')[0]; // Remove codecs from the mimetype if any.
let extensions = this.mimeToExt[mimetype];
if (!extensions) {
return;
}
for (let i = 0; i < extensions.length; i++) {
let extension = extensions[i];
if (this.extToMime[extension] && this.extToMime[extension].string) {
return this.extToMime[extension].string;
}
}
}
/**
* Given a group name, return the translated name.
*
* @param {string} name Group name.
* @return {string} Translated name.
*/
getTranslatedGroupName(name: string) : string {
let key = 'mm.core.mimetype-group:' + name,
translated = this.translate.instant(key);
return translated != key ? translated : name;
}
/**
* Check if an extension belongs to at least one of the groups.
* Similar to Moodle's file_mimetype_in_typegroup, but using the extension instead of mimetype.
*
* @param {string} extension Extension.
* @param {string[]} groups List of groups to check.
* @return {boolean} Whether the extension belongs to any of the groups.
*/
isExtensionInGroup(extension: string, groups: string[]) : boolean {
extension = this.cleanExtension(extension);
if (groups && groups.length && this.extToMime[extension] && this.extToMime[extension].groups) {
for (let i = 0; i < this.extToMime[extension].groups.length; i++) {
let group = this.extToMime[extension].groups[i];
if (groups.indexOf(group) != -1) {
return true;
}
}
}
return false;
}
/**
* Remove the extension from a path (if any).
*
* @param {string} path Path.
* @return {string} Path without extension.
*/
removeExtension(path: string) : string {
let extension,
position = path.lastIndexOf('.');
if (position > -1) {
// Check extension corresponds to a mimetype to know if it's valid.
extension = path.substr(position + 1);
if (typeof this.getMimeType(extension) != 'undefined') {
return path.substr(0, position); // Remove extension.
}
}
return path;
}
}

View File

@ -0,0 +1,698 @@
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { CoreLangProvider } from '../lang';
/*
* "Utils" service with helper functions for text.
*/
@Injectable()
export class CoreTextUtilsProvider {
element = document.createElement('div'); // Fake element to use in some functions, to prevent re-creating it each time.
constructor(private translate: TranslateService, private langProvider: CoreLangProvider) {}
/**
* Add or remove 'www' from a URL. The url needs to have http or https protocol.
*
* @param {string} url URL to modify.
* @return {string} Modified URL.
*/
addOrRemoveWWW(url: string) : string {
if (url) {
if (url.match(/http(s)?:\/\/www\./)) {
// Already has www. Remove it.
url = url.replace('www.', '');
} else {
url = url.replace('https://', 'https://www.');
url = url.replace('http://', 'http://www.');
}
}
return url;
}
/**
* Given a list of sentences, build a message with all of them wrapped in <p>.
*
* @param {string[]} messages Messages to show.
* @return {string} Message with all the messages.
*/
buildMessage(messages: string[]) : string {
let result = '';
messages.forEach((message) => {
if (message) {
result += `<p>${message}</p>`;
}
});
return result;
}
/**
* Convert size in bytes into human readable format
*
* @param {number} bytes Number of bytes to convert.
* @param {number} [precision=2] Number of digits after the decimal separator.
* @return {string} Size in human readable format.
*/
bytesToSize(bytes: number, precision = 2) : string {
if (typeof bytes == 'undefined' || bytes < 0) {
return this.translate.instant('mm.core.notapplicable');
}
if (precision < 0) {
precision = 2;
}
let keys = ['mm.core.sizeb', 'mm.core.sizekb', 'mm.core.sizemb', 'mm.core.sizegb', 'mm.core.sizetb'],
units = this.translate.instant(keys),
pos = 0;
if (bytes >= 1024) {
while (bytes >= 1024) {
pos++;
bytes = bytes / 1024;
}
// Round to "precision" decimals if needed.
bytes = Number(Math.round(parseFloat(bytes + 'e+' + precision)) + 'e-' + precision);
}
return this.translate.instant('mm.core.humanreadablesize', {size: bytes, unit: units[keys[pos]]});
}
/**
* Clean HTML tags.
*
* @param {string} text The text to be cleaned.
* @param {boolean} [singleLine] True if new lines should be removed (all the text in a single line).
* @return {string} Clean text.
*/
cleanTags(text: string, singleLine?: boolean) : string {
if (!text) {
return '';
}
// First, we use a regexpr.
text = text.replace(/(<([^>]+)>)/ig,"");
// Then, we rely on the browser. We need to wrap the text to be sure is HTML.
this.element.innerHTML = text;
text = this.element.textContent;
// Recover or remove new lines.
text = this.replaceNewLines(text, singleLine ? ' ' : '<br>');
return text;
}
/**
* Concatenate two paths, adding a slash between them if needed.
*
* @param {string} leftPath Left path.
* @param {string} rightPath Right path.
* @return {string} Concatenated path.
*/
concatenatePaths(leftPath: string, rightPath: string) : string {
if (!leftPath) {
return rightPath;
} else if (!rightPath) {
return leftPath;
}
let lastCharLeft = leftPath.slice(-1),
firstCharRight = rightPath.charAt(0);
if (lastCharLeft === '/' && firstCharRight === '/') {
return leftPath + rightPath.substr(1);
} else if(lastCharLeft !== '/' && firstCharRight !== '/') {
return leftPath + '/' + rightPath;
} else {
return leftPath + rightPath;
}
}
/**
* Count words in a text.
*
* @param {string} text Text to count.
* @return {number} Number of words.
*/
countWords(text: string) : number {
// Clean HTML scripts and tags.
text = text.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, '');
text = text.replace(/<\/?(?!\!)[^>]*>/gi, '');
// Decode HTML entities.
text = this.decodeHTMLEntities(text);
// Replace underscores (which are classed as word characters) with spaces.
text = text.replace(/_/gi, " ");
// This RegEx will detect any word change including Unicode chars. Some languages without spaces won't be counted fine.
return text.match(/\S+/gi).length;
}
/**
* Decode an escaped HTML text. This implementation is based on PHP's htmlspecialchars_decode.
*
* @param {string|number} text Text to decode.
* @return {string} Decoded text.
*/
decodeHTML(text: string|number) : string {
if (typeof text == 'undefined' || text === null || (typeof text == 'number' && isNaN(text))) {
return '';
} else if (typeof text != 'string') {
return '' + text;
}
return text
.replace(/&amp;/g, '&')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&quot;/g, '"')
.replace(/&#039;/g, "'")
.replace(/&nbsp;/g, ' ');
}
/**
* Decode HTML entities in a text. Equivalent to PHP html_entity_decode.
*
* @param {string} text Text to decode.
* @return {string} Decoded text.
*/
decodeHTMLEntities(text: string) : string {
if (text) {
this.element.innerHTML = text;
text = this.element.textContent;
this.element.textContent = '';
}
return text;
}
/**
* Same as Javascript's decodeURI, but if an exception is thrown it will return the original URI.
*
* @param {string} uri URI to decode.
* @return {string} Decoded URI, or original URI if an exception is thrown.
*/
decodeURI(uri: string) : string {
try {
return decodeURI(uri);
} catch(ex) {
// Error, use the original URI.
}
return uri;
}
/**
* Same as Javascript's decodeURIComponent, but if an exception is thrown it will return the original URI.
*
* @param {string} uri URI to decode.
* @return {string} Decoded URI, or original URI if an exception is thrown.
*/
decodeURIComponent(uri: string) : string {
try {
return decodeURIComponent(uri);
} catch(ex) {
// Error, use the original URI.
}
return uri;
}
/**
* Escapes some characters in a string to be used as a regular expression.
*
* @param {string} text Text to escape.
* @return {string} Escaped text.
*/
escapeForRegex(text: string) : string {
if (!text) {
return '';
}
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
}
/**
* Escape an HTML text. This implementation is based on PHP's htmlspecialchars.
*
* @param {string|number} text Text to escape.
* @return {string} Escaped text.
*/
escapeHTML(text: string|number) : string {
if (typeof text == 'undefined' || text === null || (typeof text == 'number' && isNaN(text))) {
return '';
} else if (typeof text != 'string') {
return '' + text;
}
return text
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
/**
* Shows a text on a new page.
*
* @param {string} title Title of the new state.
* @param {string} text Content of the text to be expanded.
* @param {boolean} [replaceLineBreaks] Whether to replace line breaks by <br> tag.
* @param {string} [component] Component to link the embedded files to.
* @param {string|number} [componentId] An ID to use in conjunction with the component.
*/
expandText(title: string, text: string, replaceLineBreaks?: boolean, component?: string, componentId?: string|number) : void {
if (text.length > 0) {
// Open a new page with the interpolated contents.
// @todo
// $state.go('site.mm_textviewer', {
// title: title,
// content: text,
// replacelinebreaks: replaceLineBreaks,
// component: component,
// componentId: componentId
// });
}
}
/**
* Formats a text, in HTML replacing new lines by correct html new lines.
*
* @param {string} text Text to format.
* @return {string} Formatted text.
*/
formatHtmlLines(text: string) : string {
let hasHTMLTags = this.hasHTMLTags(text);
if (text.indexOf('<p>') == -1) {
// Wrap the text in <p> tags.
text = '<p>' + text + '</p>';
}
if (!hasHTMLTags) {
// The text doesn't have HTML, replace new lines for <br>.
return this.replaceNewLines(text, '<br>');
}
return text;
}
/**
* Formats a text, treating multilang tags and cleaning HTML if needed.
*
* @param {string} text Text to format.
* @param {boolean} [clean] Whether HTML tags should be removed.
* @param {boolean} [singleLine] Whether new lines should be removed. Only valid if clean is true.
* @param {number} [shortenLength] Number of characters to shorten the text.
* @return {Promise<string>} Promise resolved with the formatted text.
*/
formatText(text: string, clean?: boolean, singleLine?: boolean, shortenLength?: number) : Promise<string> {
return this.treatMultilangTags(text).then((formatted) => {
if (clean) {
formatted = this.cleanTags(formatted, singleLine);
}
if (shortenLength > 0) {
formatted = this.shortenText(formatted, shortenLength);
}
return formatted;
});
}
/**
* Formats a URL, trim, lowercase, etc...
*
* @param {string} url The url to be formatted.
* @return {string} Fromatted url.
*/
formatURL(url: string) : string {
url = url.trim();
// Check if the URL starts by http or https.
if (! /^http(s)?\:\/\/.*/i.test(url)) {
// Test first allways https.
url = 'https://' + url;
}
// http allways in lowercase.
url = url.replace(/^http/i, 'http');
url = url.replace(/^https/i, 'https');
// Replace last slash.
url = url.replace(/\/$/, "");
return url;
}
/**
* Given a URL, returns what's after the last '/' without params.
* Example:
* http://mysite.com/a/course.html?id=1 -> course.html
*
* @param {string} url URL to treat.
* @return {string} Last file without params.
*/
getLastFileWithoutParams(url: string) : string {
let filename = url.substr(url.lastIndexOf('/') + 1);
if (filename.indexOf('?') != -1) {
filename = filename.substr(0, filename.indexOf('?'));
}
return filename;
}
/**
* Get the pluginfile URL to replace @@PLUGINFILE@@ wildcards.
*
* @param {any[]} files Files to extract the URL from. They need to have the URL in a 'url' or 'fileurl' attribute.
* @return {string} Pluginfile URL, undefined if no files found.
*/
getTextPluginfileUrl(files: any[]) : string {
if (files && files.length) {
let fileURL = files[0].url || files[0].fileurl;
// Remove text after last slash (encoded or not).
return fileURL.substr(0, Math.max(fileURL.lastIndexOf('/'), fileURL.lastIndexOf('%2F')));
}
return undefined;
}
/**
* Get the protocol from a URL.
* E.g. http://www.google.com returns 'http'.
*
* @param {string} url URL to treat.
* @return {string} Protocol, undefined if no protocol found.
*/
getUrlProtocol(url: string) : string {
if (!url) {
return;
}
let matches = url.match(/^([^\/:\.\?]*):\/\//);
if (matches && matches[1]) {
return matches[1];
}
}
/**
* Get the scheme from a URL. Please notice that, if a URL has protocol, it will return the protocol.
* E.g. javascript:doSomething() returns 'javascript'.
*
* @param {string} url URL to treat.
* @return {string} Scheme, undefined if no scheme found.
*/
getUrlScheme(url: string) : string {
if (!url) {
return;
}
let matches = url.match(/^([a-z][a-z0-9+\-.]*):/);
if (matches && matches[1]) {
return matches[1];
}
}
/*
* Gets a username from a URL like: user@mysite.com.
*
* @param {string} url URL to treat.
* @return {string} Username. Undefined if no username found.
*/
getUsernameFromUrl(url: string) : string {
if (url.indexOf('@') > -1) {
// Get URL without protocol.
let withoutProtocol = url.replace(/.*?:\/\//, ''),
matches = withoutProtocol.match(/[^@]*/);
// Make sure that @ is at the start of the URL, not in a param at the end.
if (matches && matches.length && !matches[0].match(/[\/|?]/)) {
return matches[0];
}
}
}
/**
* Check if a text contains HTML tags.
*
* @param {string} text Text to check.
* @return {boolean} Whether it has HTML tags.
*/
hasHTMLTags(text: string) : boolean {
return /<[a-z][\s\S]*>/i.test(text);
}
/**
* Check if a text contains Unicode long chars.
* Using as threshold Hex value D800
*
* @param {string} text Text to check.
* @return {boolean} True if has Unicode chars, false otherwise.
*/
hasUnicode(text: string) : boolean {
for (let x = 0; x < text.length; x++) {
if (text.charCodeAt(x) > 55295) {
return true;
}
}
return false;
}
/**
* Check if an object has any long Unicode char.
*
* @param {object} data Object to be checked.
* @return {boolean} If the data has any long Unicode char on it.
*/
hasUnicodeData(data: object) : boolean {
for (let el in data) {
if (typeof data[el] == 'object') {
if (this.hasUnicodeData(data[el])) {
return true;
}
} else if (typeof data[el] == 'string' && this.hasUnicode(data[el])) {
return true;
}
}
return false;
}
/**
* Same as Javascript's JSON.parse, but if an exception is thrown it will return the original text.
*
* @param {string} json JSON text.
* @return {any} JSON parsed as object or what it gets.
*/
parseJSON(json: string) : any {
try {
return JSON.parse(json);
} catch(ex) {
// Error, use the json text.
}
return json;
}
/**
* Remove protocol and www from a URL.
*
* @param {string} url URL to treat.
* @return {string} Treated URL.
*/
removeProtocolAndWWW(url: string) : string {
// Remove protocol.
url = url.replace(/.*?:\/\//g, '');
// Remove www.
url = url.replace(/^www./, '');
return url;
}
/**
* Replace all characters that cause problems with files in Android and iOS.
*
* @param {string} text Text to treat.
* @return {string} Treated text.
*/
removeSpecialCharactersForFiles(text: string) : string {
return text.replace(/[#:\/\?\\]+/g, '_');
}
/**
* Replace all the new lines on a certain text.
*
* @param {string} text The text to be treated.
* @param {string} newValue Text to use instead of new lines.
* @return {string} Treated text.
*/
replaceNewLines(text: string, newValue: string) : string {
return text.replace(/(?:\r\n|\r|\n)/g, newValue);
}
/**
* Replace @@PLUGINFILE@@ wildcards with the real URL in a text.
*
* @param {string} Text to treat.
* @param {any[]} files Files to extract the pluginfile URL from. They need to have the URL in a url or fileurl attribute.
* @return {string} Treated text.
*/
replacePluginfileUrls(text: string, files: any[]) : string {
if (text) {
let fileURL = this.getTextPluginfileUrl(files);
if (fileURL) {
return text.replace(/@@PLUGINFILE@@/g, fileURL);
}
}
return text;
}
/**
* Replace pluginfile URLs with @@PLUGINFILE@@ wildcards.
*
* @param {string} text Text to treat.
* @param {any[]} files Files to extract the pluginfile URL from. They need to have the URL in a url or fileurl attribute.
* @return {string} Treated text.
*/
restorePluginfileUrls(text: string, files: any[]) : string {
if (text) {
let fileURL = this.getTextPluginfileUrl(files);
if (fileURL) {
return text.replace(new RegExp(this.escapeForRegex(fileURL), 'g'), '@@PLUGINFILE@@');
}
}
return text;
}
/**
* Rounds a number to use a certain amout of decimals or less.
* Difference between this function and float's toFixed:
* 7.toFixed(2) -> 7.00
* roundToDecimals(7, 2) -> 7
*
* @param {number} number Number to round.
* @param {number} [decimals=2] Number of decimals. By default, 2.
* @return {number} Rounded number.
*/
roundToDecimals(number: number, decimals = 2) : number {
let multiplier = Math.pow(10, decimals);
return Math.round(number * multiplier) / multiplier;
}
/**
* Add quotes to HTML characters.
*
* Returns text with HTML characters (like "<", ">", etc.) properly quoted.
* Based on Moodle's s() function.
*
* @param {string} text Text to treat.
* @return {string} Treated text.
*/
s(text: string) : string {
if (!text) {
return '';
}
return this.escapeHTML(text).replace(/&amp;#(\d+|x[0-9a-f]+);/i, '&#$1;');
}
/**
* Shortens a text to length and adds an ellipsis.
*
* @param {string} text The text to be shortened.
* @param {number} length The desired length.
* @return {string} Shortened text.
*/
shortenText(text: string, length: number) : string {
if (text.length > length) {
text = text.substr(0, length);
// Now, truncate at the last word boundary (if exists).
let lastWordPos = text.lastIndexOf(' ');
if (lastWordPos > 0) {
text = text.substr(0, lastWordPos);
}
text += '&hellip;';
}
return text;
}
/**
* Strip Unicode long char of a given text.
* Using as threshold Hex value D800
*
* @param {string} text Text to check.
* @return {string} Without the Unicode chars.
*/
stripUnicode(text: string) : string {
let stripped = '';
for (let x = 0; x < text.length; x++) {
if (text.charCodeAt(x) <= 55295){
stripped += text.charAt(x);
}
}
return stripped;
}
/**
* Treat the multilang tags from a HTML code, leaving only the current language.
*
* @param {string} text The text to be treated.
* @return {Promise<string>} Promise resolved with the formatted text.
*/
treatMultilangTags(text: string) : Promise<string> {
if (!text) {
return Promise.resolve('');
}
return this.langProvider.getCurrentLanguage().then((language) => {
// Match the current language.
let currentLangRegEx = new RegExp('<(?:lang|span)[^>]+lang="' + language + '"[^>]*>(.*?)<\/(?:lang|span)>', 'g'),
anyLangRegEx = /<(?:lang|span)[^>]+lang="[a-zA-Z0-9_-]+"[^>]*>(.*?)<\/(?:lang|span)>/g;
if (!text.match(currentLangRegEx)) {
// Current lang not found. Try to find the first language.
let matches = text.match(anyLangRegEx);
if (matches && matches[0]) {
language = matches[0].match(/lang="([a-zA-Z0-9_-]+)"/)[1];
currentLangRegEx = new RegExp('<(?:lang|span)[^>]+lang="' + language + '"[^>]*>(.*?)<\/(?:lang|span)>', 'g');
} else {
// No multi-lang tag found, stop.
return text;
}
}
// Extract contents of current language.
text = text.replace(currentLangRegEx, '$1');
// Delete the rest of languages
text = text.replace(anyLangRegEx, '');
return text;
});
}
/**
* If a number has only 1 digit, add a leading zero to it.
*
* @param {string|number} num Number to convert.
* @return {string} Number with leading zeros.
*/
twoDigits(num: string|number) : string {
if (num < 10) {
return '0' + num;
} else {
return '' + num; // Convert to string for coherence.
}
}
/**
* Make a string's first character uppercase.
*
* @param {string} text Text to treat.
* @return {string} Treated text.
*/
ucFirst(text: string) : string {
return text.charAt(0).toUpperCase() + text.slice(1);
}
}

View File

@ -0,0 +1,148 @@
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import * as moment from 'moment';
import { CoreConstants } from '../../core/constants';
/*
* "Utils" service with helper functions for date and time.
*/
@Injectable()
export class CoreTimeUtilsProvider {
constructor(private translate: TranslateService) {}
/**
* Returns hours, minutes and seconds in a human readable format
*
* @param {number} seconds A number of seconds
* @return {string} Seconds in a human readable format.
*/
formatTime(seconds: number) : string {
let totalSecs = Math.abs(seconds),
years = Math.floor(totalSecs / CoreConstants.secondsYear),
remainder = totalSecs - (years * CoreConstants.secondsYear),
days = Math.floor(remainder / CoreConstants.secondsDay);
remainder = totalSecs - (days * CoreConstants.secondsDay);
let hours = Math.floor(remainder / CoreConstants.secondsHour);
remainder = remainder - (hours * CoreConstants.secondsHour);
let mins = Math.floor(remainder / CoreConstants.secondsMinute),
secs = remainder - (mins * CoreConstants.secondsMinute),
ss = this.translate.instant('mm.core.' + (secs == 1 ? 'sec' : 'secs')),
sm = this.translate.instant('mm.core.' + (mins == 1 ? 'min' : 'mins')),
sh = this.translate.instant('mm.core.' + (hours == 1 ? 'hour' : 'hours')),
sd = this.translate.instant('mm.core.' + (days == 1 ? 'day' : 'days')),
sy = this.translate.instant('mm.core.' + (years == 1 ? 'year' : 'years')),
oyears = '',
odays = '',
ohours = '',
omins = '',
osecs = '';
if (years) {
oyears = years + ' ' + sy;
}
if (days) {
odays = days + ' ' + sd;
}
if (hours) {
ohours = hours + ' ' + sh;
}
if (mins) {
omins = mins + ' ' + sm;
}
if (secs) {
osecs = secs + ' ' + ss;
}
if (years) {
return oyears + ' ' + odays;
}
if (days) {
return odays + ' ' + ohours;
}
if (hours) {
return ohours + ' ' + omins;
}
if (mins) {
return omins + ' ' + osecs;
}
if (secs) {
return osecs;
}
return this.translate.instant('mm.core.now');
}
/**
* Returns hours, minutes and seconds in a human readable format.
*
* @param {number} duration Duration in seconds
* @param {number} [precision] Number of elements to have in precission. 0 or undefined to full precission.
* @return {string} Duration in a human readable format.
*/
formatDuration(duration: number, precision?: number) : string {
precision = precision || 5;
let eventDuration = moment.duration(duration, 'seconds'),
durationString = '';
if (precision && eventDuration.years() > 0) {
durationString += ' ' + moment.duration(eventDuration.years(), 'years').humanize();
precision--;
}
if (precision && eventDuration.months() > 0) {
durationString += ' ' + moment.duration(eventDuration.months(), 'months').humanize();
precision--;
}
if (precision && eventDuration.days() > 0) {
durationString += ' ' + moment.duration(eventDuration.days(), 'days').humanize();
precision--;
}
if (precision && eventDuration.hours() > 0) {
durationString += ' ' + moment.duration(eventDuration.hours(), 'hours').humanize();
precision--;
}
if (precision && eventDuration.minutes() > 0) {
durationString += ' ' + moment.duration(eventDuration.minutes(), 'minutes').humanize();
precision--;
}
return durationString.trim();
}
/**
* Return the current timestamp in a "readable" format: YYYYMMDDHHmmSS.
*
* @return {string} The readable timestamp.
*/
readableTimestamp() : string {
return moment(Date.now()).format('YYYYMMDDHHmmSS');
}
/**
* Return the current timestamp (UNIX format, seconds).
*
* @return {number} The current timestamp in seconds.
*/
timestamp() : number {
return Math.round(Date.now() / 1000);
}
}

View File

@ -0,0 +1,180 @@
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { Injectable } from '@angular/core';
import { CoreLangProvider } from '../lang';
/*
* "Utils" service with helper functions for URLs.
*/
@Injectable()
export class CoreUrlUtilsProvider {
constructor(private langProvider: CoreLangProvider) {}
/**
* Extracts the parameters from a URL and stores them in an object.
*
* @param {string} url URL to treat.
* @return {object} Object with the params.
*/
extractUrlParams(url: string) : object {
let regex = /[?&]+([^=&]+)=?([^&]*)?/gi,
params = {};
url.replace(regex, (match: string, key: string, value: string) : string => {
params[key] = typeof value != 'undefined' ? value : '';
return match;
});
return params;
}
/**
* Returns the URL to the documentation of the app, based on Moodle version and current language.
*
* @param {string} [release] Moodle release.
* @param {string} [page=Mobile_app] Docs page to go to.
* @return {Promise<string>} Promise resolved with the Moodle docs URL.
*/
getDocsUrl(release?: string, page = 'Mobile_app') : Promise<string> {
let docsUrl = 'https://docs.moodle.org/en/' + page;
if (typeof release != 'undefined') {
let version = release.substr(0, 3).replace('.', '');
// Check is a valid number.
if (parseInt(version) >= 24) {
// Append release number.
docsUrl = docsUrl.replace('https://docs.moodle.org/', 'https://docs.moodle.org/' + version + '/');
}
}
return this.langProvider.getCurrentLanguage().then((lang) => {
return docsUrl.replace('/en/', '/' + lang + '/');
}).catch(() => {
return docsUrl;
});
}
/**
* Returns if a URL has any protocol (not a relative URL).
*
* @param {string} url The url to test against the pattern.
* @return {boolean} Whether the url is absolute.
*/
isAbsoluteURL(url: string) : boolean {
return /^[^:]{2,}:\/\//i.test(url) || /^(tel:|mailto:|geo:)/.test(url);
}
/**
* Returns if a URL is downloadable: plugin file OR theme/image.php OR gravatar.
*
* @param {string} url The URL to test.
* @return {boolean} Whether the URL is downloadable.
*/
isDownloadableUrl(url: string) : boolean {
return this.isPluginFileUrl(url) || this.isThemeImageUrl(url) || this.isGravatarUrl(url);
}
/**
* Returns if a URL is a gravatar URL.
*
* @param {string} url The URL to test.
* @return {boolean} Whether the URL is a gravatar URL.
*/
isGravatarUrl(url: string) : boolean {
return url && url.indexOf('gravatar.com/avatar') !== -1;
}
/**
* Check if a URL uses http or https protocol.
*
* @param {string} url The url to test.
* @return {boolean} Whether the url uses http or https protocol.
*/
isHttpURL(url: string) : boolean {
return /^https?\:\/\/.+/i.test(url);
}
/**
* Returns if a URL is a pluginfile URL.
*
* @param {string} url The URL to test.
* @return {boolean} Whether the URL is a pluginfile URL.
*/
isPluginFileUrl(url: string) : boolean {
return url && url.indexOf('/pluginfile.php') !== -1;
}
/**
* Returns if a URL is a theme image URL.
*
* @param {string} url The URL to test.
* @return {boolean} Whether the URL is a theme image URL.
*/
isThemeImageUrl(url: string) : boolean {
return url && url.indexOf('/theme/image.php') !== -1;
}
/**
* Generic function for adding the wstoken to Moodle urls and for pointing to the correct script.
* For download remote files from Moodle we need to use the special /webservice/pluginfile passing
* the ws token as a get parameter.
*
* @param {string} url The url to be fixed.
* @param {string} token Token to use.
* @return {string} Fixed URL.
*/
fixPluginfileURL(url: string, token: string) : string {
if (!url || !token) {
return '';
}
// First check if we need to fix this url or is already fixed.
if (url.indexOf('token=') != -1) {
return url;
}
// Check if is a valid URL (contains the pluginfile endpoint).
if (!this.isPluginFileUrl(url)) {
return url;
}
// In which way the server is serving the files? Are we using slash parameters?
if (url.indexOf('?file=') != -1 || url.indexOf('?forcedownload=') != -1 || url.indexOf('?rev=') != -1) {
url += '&';
} else {
url += '?';
}
// Always send offline=1 (for external repositories). It shouldn't cause problems for local files or old Moodles.
url += 'token=' + token + '&offline=1';
// Some webservices returns directly the correct download url, others not.
if (url.indexOf('/webservice/pluginfile') == -1) {
url = url.replace('/pluginfile', '/webservice/pluginfile');
}
return url;
}
/**
* Remove the parameters from a URL, returning the URL without them.
*
* @param {string} url URL to treat.
* @return {string} URL without params.
*/
removeUrlParams(url: string) : string {
let matches = url.match(/^[^\?]+/);
return matches && matches[0];
}
}

File diff suppressed because it is too large Load Diff