a single string list might be easier the strings will have the form of en=Englishfa=Persianfr=Frenchde=Deutschand you access them using the values property eg.showmessage('fa is '+MyStringList.Values['fa']);
I don't like to add language names into a TStringList
function IsoToLang(const iso: string): string;begin case lowerCase(iso) of 'de': Result:= 'Deutsch'; 'en': Result:= 'English'; 'fa': Result:= 'Persian'; 'fr': Result:= 'French'; else Result:= 'unknown'; end;end;
Dear ojZim, if you don't like to write code you should not be a programmer.
'aa': Result := 'Afar';'ab': Result := 'Abkhaz';'ae': Result := 'Avestan';'af': Result := 'Afrikaans ';'af': Result := 'Afrikaans';'ak': Result := 'Akan';'am': Result := 'Amharic';'an': Result := 'Aragonese';'ar': Result := 'Arabic';'ar-ae': Result := 'Arabic (U.A.E.)';'ar-bh': Result := 'Arabic (Bahrain) ';'ar-dz': Result := 'Arabic (Algeria) ';'ar-eg': Result := 'Arabic (Egypt) ';'ar-iq': Result := 'Arabic (Iraq)';'ar-jo': Result := 'Arabic (Jordan) ';'ar-kw': Result := 'Arabic (Kuwait) ';'ar-lb': Result := 'Arabic (Lebanon)';'ar-ly': Result := 'Arabic (Libya)';'ar-ma': Result := 'Arabic (Morocco)';'ar-om': Result := 'Arabic (Oman)';'ar-qa': Result := 'Arabic (Qatar)';'ar-sa': Result := 'Arabic (Saudi Arabia) ';'ar-sy': Result := 'Arabic (Syria)';'ar-tn': Result := 'Arabic (Tunisia) ';'ar-ye': Result := 'Arabic (Yemen) ';'as': Result := 'Assamese';'av': Result := 'Avaric';'ay': Result := 'Aymara';'az': Result := 'Azerbaijani';'ba': Result := 'Bashkir';'be': Result := 'Belarusian ';'bg': Result := 'Bulgarian';'bh': Result := 'Bihari';'bi': Result := 'Bislama';'bm': Result := 'Bambara';'bn': Result := 'Bengali; Bangla';'bo': Result := 'Tibetan Standard, Tibetan, Central';'br': Result := 'Breton';'bs': Result := 'Bosnian';'ca': Result := 'Catalan; Valencian';'ce': Result := 'Chechen';'ch': Result := 'Chamorro';'co': Result := 'Corsican';'cr': Result := 'Cree';'cs': Result := 'Czech';'cu': Result := 'Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic';'cv': Result := 'Chuvash';'cy': Result := 'Welsh';'da': Result := 'Danish ';'de': Result := 'German (Standard) ';'de-at': Result := 'German (Austria) ';'de-ch': Result := 'German (Switzerland)';'de-li': Result := 'German (Liechtenstein) ';'de-lu': Result := 'German (Luxembourg)';'dv': Result := 'Divehi; Dhivehi; Maldivian;';'dz': Result := 'Dzongkha';'ee': Result := 'Ewe';'el': Result := 'Greek, Modern';'en': Result := 'English';'en-au': Result := 'English (Australia) ';'en-bz': Result := 'English (Belize)';'en-ca': Result := 'English (Canada)';'en-gb': Result := 'English (United Kingdom)';'en-ie': Result := 'English (Ireland)';'en-jm': Result := 'English (Jamaica)';'en-nz': Result := 'English (New Zealand) ';'en-tt': Result := 'English (Trinidad) ';'en-us': Result := 'English (United States) ';'en-za': Result := 'English (South Africa) ';'eo': Result := 'Esperanto';'es': Result := 'Spanish (Spain)';'es-ar': Result := 'Spanish (Argentina) ';'es-bo': Result := 'Spanish (Bolivia)';'es-cl': Result := 'Spanish (Chile) ';'es-co': Result := 'Spanish (Colombia) ';'es-cr': Result := 'Spanish (Costa Rica) ';'es-do': Result := 'Spanish (Dominican Republic) ';'es-ec': Result := 'Spanish (Ecuador)';'es-gt': Result := 'Spanish (Guatemala)';'es-hn': Result := 'Spanish (Honduras)';'es-mx': Result := 'Spanish (Mexico) ';'es-ni': Result := 'Spanish (Nicaragua) ';'es-pa': Result := 'Spanish (Panama)';'es-pe': Result := 'Spanish (Peru)';'es-pr': Result := 'Spanish (Puerto Rico)';'es-py': Result := 'Spanish (Paraguay) ';'es-sv': Result := 'Spanish (El Salvador) ';'es-uy': Result := 'Spanish (Uruguay)';'es-ve': Result := 'Spanish (Venezuela)';'et': Result := 'Estonian';'eu': Result := 'Basque';'fa': Result := 'Persian';'ff': Result := 'Fula; Fulah; Pulaar; Pular';'fi': Result := 'Finnish';'fj': Result := 'Fijian';'fo': Result := 'Faeroese ';'fr': Result := 'French';'fr-be': Result := 'French (Belgium) ';'fr-ca': Result := 'French (Canada)';'fr-ch': Result := 'French (Switzerland) ';'fr-lu': Result := 'French (Luxembourg)';'fy': Result := 'Western Frisian';'ga': Result := 'Irish';'gd': Result := 'Scottish Gaelic; Gaelic';'gl': Result := 'Galician';'gn': Result := 'Guaraní';'gu': Result := 'Gujarati';'gv': Result := 'Manx';'ha': Result := 'Hausa';'he': Result := 'Hebrew (modern)';'hi': Result := 'Hindi';'ho': Result := 'Hiri Motu';'hr': Result := 'Croatian';'ht': Result := 'Haitian; Haitian Creole';'hu': Result := 'Hungarian';'hy': Result := 'Armenian';'hz': Result := 'Herero';'ia': Result := 'Interlingua';'id': Result := 'Indonesian';'ie': Result := 'Interlingue';'ig': Result := 'Igbo';'ii': Result := 'Nuosu';'ik': Result := 'Inupiaq';'io': Result := 'Ido';'is': Result := 'Icelandic';'it': Result := 'Italian';'it-ch': Result := 'Italian (Switzerland) ';'iu': Result := 'Inuktitut';'ja': Result := 'Japanese';'ji': Result := 'Yiddish ';'jv': Result := 'Javanese';'ka': Result := 'Georgian';'kg': Result := 'Kongo';'ki': Result := 'Kikuyu, Gikuyu';'kj': Result := 'Kwanyama, Kuanyama';'kk': Result := 'Kazakh';'kl': Result := 'Kalaallisut, Greenlandic';'km': Result := 'Khmer';'kn': Result := 'Kannada';'ko': Result := 'Korean';'kr': Result := 'Kanuri';'ks': Result := 'Kashmiri';'ku': Result := 'Kurdish';'kv': Result := 'Komi';'kw': Result := 'Cornish';'ky': Result := 'Kyrgyz';'la': Result := 'Latin';'lb': Result := 'Luxembourgish, Letzeburgesch';'lg': Result := 'Ganda';'li': Result := 'Limburgish, Limburgan, Limburger';'ln': Result := 'Lingala';'lo': Result := 'Lao';'lt': Result := 'Lithuanian';'lu': Result := 'Luba-Katanga';'lv': Result := 'Latvian';'mg': Result := 'Malagasy';'mh': Result := 'Marshallese';'mi': Result := 'Māori';'mk': Result := 'Macedonian';'ml': Result := 'Malayalam';'mn': Result := 'Mongolian';'mr': Result := 'Marathi (Marāṭhī)';'ms': Result := 'Malay';'ms': Result := 'Malaysian';'mt': Result := 'Maltese';'my': Result := 'Burmese';'na': Result := 'Nauru';'nb': Result := 'Norwegian Bokmål';'nd': Result := 'North Ndebele';'ne': Result := 'Nepali';'ng': Result := 'Ndonga';'nl': Result := 'Dutch';'nl-be': Result := 'Dutch (Belgium) ';'nn': Result := 'Norwegian Nynorsk';'no': Result := 'Norwegian';'nr': Result := 'South Ndebele';'nv': Result := 'Navajo, Navaho';'ny': Result := 'Chichewa; Chewa; Nyanja';'oc': Result := 'Occitan';'oj': Result := 'Ojibwe, Ojibwa';'om': Result := 'Oromo';'or': Result := 'Oriya';'os': Result := 'Ossetian, Ossetic';'pa': Result := 'Panjabi, Punjabi';'pi': Result := 'Pāli';'pl': Result := 'Polish';'ps': Result := 'Pashto, Pushto';'pt': Result := 'Portuguese (Portugal)';'pt-br': Result := 'Portuguese (Brazil) ';'qu': Result := 'Quechua';'rm': Result := 'Rhaeto-Romanic ';'rn': Result := 'Kirundi';'ro': Result := 'Romanian';'ro-mo': Result := 'Romanian (Republic of Moldova) ';'ru': Result := 'Russian';'ru-mo': Result := 'Russian (Republic of Moldova) ';'rw': Result := 'Kinyarwanda';'sa': Result := 'Sanskrit (Saṁskṛta)';'sb': Result := 'Sorbian ';'sc': Result := 'Sardinian';'sd': Result := 'Sindhi';'se': Result := 'Northern Sami';'sg': Result := 'Sango';'si': Result := 'Sinhala, Sinhalese';'sk': Result := 'Slovak';'sl': Result := 'Slovenian';'sm': Result := 'Samoan';'sn': Result := 'Shona';'so': Result := 'Somali';'sq': Result := 'Albanian';'sr': Result := 'Serbian';'ss': Result := 'Swati';'st': Result := 'Southern Sotho';'su': Result := 'Sundanese';'sv': Result := 'Swedish';'sv-fi': Result := 'Swedish (Finland) ';'sw': Result := 'Swahili';'sx': Result := 'Sutu ';'sz': Result := 'Sami (Lappish)';'ta': Result := 'Tamil';'te': Result := 'Telugu';'tg': Result := 'Tajik';'th': Result := 'Thai';'ti': Result := 'Tigrinya';'tk': Result := 'Turkmen';'tl': Result := 'Tagalog';'tn': Result := 'Tswana';'to': Result := 'Tonga (Tonga Islands)';'tr': Result := 'Turkish';'ts': Result := 'Tsonga';'tt': Result := 'Tatar';'tw': Result := 'Twi';'ty': Result := 'Tahitian';'ug': Result := 'Uighur, Uyghur';'uk': Result := 'Ukrainian';'ur': Result := 'Urdu';'uz': Result := 'Uzbek';'ve': Result := 'Venda';'vi': Result := 'Vietnamese';'vo': Result := 'Volapük';'wa': Result := 'Walloon';'wo': Result := 'Wolof';'xh': Result := 'Xhosa';'yi': Result := 'Yiddish';'yo': Result := 'Yoruba';'za': Result := 'Zhuang, Chuang';'zh': Result := 'Chinese';'zh-cn': Result := 'Chinese (PRC)';'zh-hk': Result := 'Chinese (Hong Kong SAR) ';'zh-sg': Result := 'Chinese (Singapore)';'zh-tw': Result := 'Chinese (Taiwan) ';'zu': Result := 'Zulu';