34 typedef std::tr1::unordered_map<std::string,std::string> CodeMap;
35 typedef CodeMap::const_iterator Index;
38 static Index getIndex(
const std::string & code_r )
40 static CodeMaps _maps;
41 return _maps.lookup( code_r );
51 inline Index lookup(
const std::string & code_r );
58 inline CodeMaps::Index CodeMaps::lookup(
const std::string & code_r )
60 Index it =
codes.find( code_r );
61 if ( it !=
codes.end() )
65 CodeMap::value_type nval( code_r, std::string() );
67 if ( code_r.size() > 3 || code_r.size() < 2 )
68 WAR <<
"Malformed LanguageCode '" << code_r <<
"' (expect 2 or 3-letter)" << endl;
71 if ( lcode != code_r )
73 WAR <<
"Malformed LanguageCode '" << code_r <<
"' (not lower case)" << endl;
76 it =
codes.find( lcode );
77 if ( it !=
codes.end() )
78 nval.second = it->second;
81 MIL <<
"Remember LanguageCode '" << code_r <<
"': '" << nval.second <<
"'" << endl;
82 return codes.insert( nval ).first;
100 :
_index( CodeMaps::getIndex( std::string() ) )
103 Impl(
const std::string & code_r )
104 :
_index( CodeMaps::getIndex( code_r ) )
111 if (
_index->second.empty() )
113 std::string ret(
_(
"Unknown language: ") );
119 return _(
_index->second.c_str() );
130 static shared_ptr<Impl> _nullimpl(
new Impl );
150 : _pimpl(
Impl::nullimpl() )
159 : _pimpl( new
Impl( code_r ) )
176 {
return _pimpl->code(); }
184 {
return _pimpl->name(); }
197 const char *iso639_2;
198 const char *iso639_1;
204 const LangInit langInit[] = {
206 {
"aar",
"aa",
N_(
"Afar" ) },
208 {
"abk",
"ab",
N_(
"Abkhazian" ) },
210 {
"ace", NULL,
N_(
"Achinese" ) },
212 {
"ach", NULL,
N_(
"Acoli" ) },
214 {
"ada", NULL,
N_(
"Adangme" ) },
216 {
"ady", NULL,
N_(
"Adyghe" ) },
218 {
"afa", NULL,
N_(
"Afro-Asiatic (Other)" ) },
220 {
"afh", NULL,
N_(
"Afrihili" ) },
222 {
"afr",
"af",
N_(
"Afrikaans" ) },
224 {
"ain", NULL,
N_(
"Ainu" ) },
226 {
"aka",
"ak",
N_(
"Akan" ) },
228 {
"akk", NULL,
N_(
"Akkadian" ) },
230 {
"alb",
"sq",
N_(
"Albanian" ) },
232 {
"sqi", NULL,
N_(
"Albanian" ) },
234 {
"ale", NULL,
N_(
"Aleut" ) },
236 {
"alg", NULL,
N_(
"Algonquian Languages" ) },
238 {
"alt", NULL,
N_(
"Southern Altai" ) },
240 {
"amh",
"am",
N_(
"Amharic" ) },
242 {
"ang", NULL,
N_(
"English, Old (ca.450-1100)" ) },
244 {
"apa", NULL,
N_(
"Apache Languages" ) },
246 {
"ara",
"ar",
N_(
"Arabic" ) },
248 {
"arc", NULL,
N_(
"Aramaic" ) },
250 {
"arg",
"an",
N_(
"Aragonese" ) },
252 {
"arm",
"hy",
N_(
"Armenian" ) },
254 {
"hye", NULL,
N_(
"Armenian" ) },
256 {
"arn", NULL,
N_(
"Araucanian" ) },
258 {
"arp", NULL,
N_(
"Arapaho" ) },
260 {
"art", NULL,
N_(
"Artificial (Other)" ) },
262 {
"arw", NULL,
N_(
"Arawak" ) },
264 {
"asm",
"as",
N_(
"Assamese" ) },
266 {
"ast", NULL,
N_(
"Asturian" ) },
268 {
"ath", NULL,
N_(
"Athapascan Languages" ) },
270 {
"aus", NULL,
N_(
"Australian Languages" ) },
272 {
"ava",
"av",
N_(
"Avaric" ) },
274 {
"ave",
"ae",
N_(
"Avestan" ) },
276 {
"awa", NULL,
N_(
"Awadhi" ) },
278 {
"aym",
"ay",
N_(
"Aymara" ) },
280 {
"aze",
"az",
N_(
"Azerbaijani" ) },
282 {
"bad", NULL,
N_(
"Banda" ) },
284 {
"bai", NULL,
N_(
"Bamileke Languages" ) },
286 {
"bak",
"ba",
N_(
"Bashkir" ) },
288 {
"bal", NULL,
N_(
"Baluchi" ) },
290 {
"bam",
"bm",
N_(
"Bambara" ) },
292 {
"ban", NULL,
N_(
"Balinese" ) },
294 {
"baq",
"eu",
N_(
"Basque" ) },
296 {
"eus", NULL,
N_(
"Basque" ) },
298 {
"bas", NULL,
N_(
"Basa" ) },
300 {
"bat", NULL,
N_(
"Baltic (Other)" ) },
302 {
"bej", NULL,
N_(
"Beja" ) },
304 {
"bel",
"be",
N_(
"Belarusian" ) },
306 {
"bem", NULL,
N_(
"Bemba" ) },
308 {
"ben",
"bn",
N_(
"Bengali" ) },
310 {
"ber", NULL,
N_(
"Berber (Other)" ) },
312 {
"bho", NULL,
N_(
"Bhojpuri" ) },
314 {
"bih",
"bh",
N_(
"Bihari" ) },
316 {
"bik", NULL,
N_(
"Bikol" ) },
318 {
"bin", NULL,
N_(
"Bini" ) },
320 {
"bis",
"bi",
N_(
"Bislama" ) },
322 {
"bla", NULL,
N_(
"Siksika" ) },
324 {
"bnt", NULL,
N_(
"Bantu (Other)" ) },
326 {
"bos",
"bs",
N_(
"Bosnian" ) },
328 {
"bra", NULL,
N_(
"Braj" ) },
330 {
"bre",
"br",
N_(
"Breton" ) },
332 {
"btk", NULL,
N_(
"Batak (Indonesia)" ) },
334 {
"bua", NULL,
N_(
"Buriat" ) },
336 {
"bug", NULL,
N_(
"Buginese" ) },
338 {
"bul",
"bg",
N_(
"Bulgarian" ) },
340 {
"bur",
"my",
N_(
"Burmese" ) },
342 {
"mya", NULL,
N_(
"Burmese" ) },
344 {
"byn", NULL,
N_(
"Blin" ) },
346 {
"cad", NULL,
N_(
"Caddo" ) },
348 {
"cai", NULL,
N_(
"Central American Indian (Other)" ) },
350 {
"car", NULL,
N_(
"Carib" ) },
352 {
"cat",
"ca",
N_(
"Catalan" ) },
354 {
"cau", NULL,
N_(
"Caucasian (Other)" ) },
356 {
"ceb", NULL,
N_(
"Cebuano" ) },
358 {
"cel", NULL,
N_(
"Celtic (Other)" ) },
360 {
"cha",
"ch",
N_(
"Chamorro" ) },
362 {
"chb", NULL,
N_(
"Chibcha" ) },
364 {
"che",
"ce",
N_(
"Chechen" ) },
366 {
"chg", NULL,
N_(
"Chagatai" ) },
368 {
"chi",
"zh",
N_(
"Chinese" ) },
370 {
"zho", NULL,
N_(
"Chinese" ) },
372 {
"chk", NULL,
N_(
"Chuukese" ) },
374 {
"chm", NULL,
N_(
"Mari" ) },
376 {
"chn", NULL,
N_(
"Chinook Jargon" ) },
378 {
"cho", NULL,
N_(
"Choctaw" ) },
380 {
"chp", NULL,
N_(
"Chipewyan" ) },
382 {
"chr", NULL,
N_(
"Cherokee" ) },
384 {
"chu",
"cu",
N_(
"Church Slavic" ) },
386 {
"chv",
"cv",
N_(
"Chuvash" ) },
388 {
"chy", NULL,
N_(
"Cheyenne" ) },
390 {
"cmc", NULL,
N_(
"Chamic Languages" ) },
392 {
"cop", NULL,
N_(
"Coptic" ) },
394 {
"cor",
"kw",
N_(
"Cornish" ) },
396 {
"cos",
"co",
N_(
"Corsican" ) },
398 {
"cpe", NULL,
N_(
"Creoles and Pidgins, English-Based (Other)" ) },
400 {
"cpf", NULL,
N_(
"Creoles and Pidgins, French-Based (Other)" ) },
402 {
"cpp", NULL,
N_(
"Creoles and Pidgins, Portuguese-Based (Other)" ) },
404 {
"cre",
"cr",
N_(
"Cree" ) },
406 {
"crh", NULL,
N_(
"Crimean Tatar" ) },
408 {
"crp", NULL,
N_(
"Creoles and Pidgins (Other)" ) },
410 {
"csb", NULL,
N_(
"Kashubian" ) },
412 {
"cus", NULL,
N_(
"Cushitic (Other)" ) },
414 {
"cze",
"cs",
N_(
"Czech" ) },
416 {
"ces", NULL,
N_(
"Czech" ) },
418 {
"dak", NULL,
N_(
"Dakota" ) },
420 {
"dan",
"da",
N_(
"Danish" ) },
422 {
"dar", NULL,
N_(
"Dargwa" ) },
424 {
"day", NULL,
N_(
"Dayak" ) },
426 {
"del", NULL,
N_(
"Delaware" ) },
428 {
"den", NULL,
N_(
"Slave (Athapascan)" ) },
430 {
"dgr", NULL,
N_(
"Dogrib" ) },
432 {
"din", NULL,
N_(
"Dinka" ) },
434 {
"div",
"dv",
N_(
"Divehi" ) },
436 {
"doi", NULL,
N_(
"Dogri" ) },
438 {
"dra", NULL,
N_(
"Dravidian (Other)" ) },
440 {
"dsb", NULL,
N_(
"Lower Sorbian" ) },
442 {
"dua", NULL,
N_(
"Duala" ) },
444 {
"dum", NULL,
N_(
"Dutch, Middle (ca.1050-1350)" ) },
446 {
"dut",
"nl",
N_(
"Dutch" ) },
448 {
"nld", NULL,
N_(
"Dutch" ) },
450 {
"dyu", NULL,
N_(
"Dyula" ) },
452 {
"dzo",
"dz",
N_(
"Dzongkha" ) },
454 {
"efi", NULL,
N_(
"Efik" ) },
456 {
"egy", NULL,
N_(
"Egyptian (Ancient)" ) },
458 {
"eka", NULL,
N_(
"Ekajuk" ) },
460 {
"elx", NULL,
N_(
"Elamite" ) },
462 {
"eng",
"en",
N_(
"English" ) },
464 {
"enm", NULL,
N_(
"English, Middle (1100-1500)" ) },
466 {
"epo",
"eo",
N_(
"Esperanto" ) },
468 {
"est",
"et",
N_(
"Estonian" ) },
470 {
"ewe",
"ee",
N_(
"Ewe" ) },
472 {
"ewo", NULL,
N_(
"Ewondo" ) },
474 {
"fan", NULL,
N_(
"Fang" ) },
476 {
"fao",
"fo",
N_(
"Faroese" ) },
478 {
"fat", NULL,
N_(
"Fanti" ) },
480 {
"fij",
"fj",
N_(
"Fijian" ) },
482 {
"fil", NULL,
N_(
"Filipino" ) },
484 {
"fin",
"fi",
N_(
"Finnish" ) },
486 {
"fiu", NULL,
N_(
"Finno-Ugrian (Other)" ) },
488 {
"fon", NULL,
N_(
"Fon" ) },
490 {
"fre",
"fr",
N_(
"French" ) },
492 {
"fra", NULL,
N_(
"French" ) },
494 {
"frm", NULL,
N_(
"French, Middle (ca.1400-1600)" ) },
496 {
"fro", NULL,
N_(
"French, Old (842-ca.1400)" ) },
498 {
"fry",
"fy",
N_(
"Frisian" ) },
500 {
"ful",
"ff",
N_(
"Fulah" ) },
502 {
"fur", NULL,
N_(
"Friulian" ) },
504 {
"gaa", NULL,
N_(
"Ga" ) },
506 {
"gay", NULL,
N_(
"Gayo" ) },
508 {
"gba", NULL,
N_(
"Gbaya" ) },
510 {
"gem", NULL,
N_(
"Germanic (Other)" ) },
512 {
"geo",
"ka",
N_(
"Georgian" ) },
514 {
"kat", NULL,
N_(
"Georgian" ) },
516 {
"ger",
"de",
N_(
"German" ) },
518 {
"deu", NULL,
N_(
"German" ) },
520 {
"gez", NULL,
N_(
"Geez" ) },
522 {
"gil", NULL,
N_(
"Gilbertese" ) },
524 {
"gla",
"gd",
N_(
"Gaelic" ) },
526 {
"gle",
"ga",
N_(
"Irish" ) },
528 {
"glg",
"gl",
N_(
"Galician" ) },
530 {
"glv",
"gv",
N_(
"Manx" ) },
532 {
"gmh", NULL,
N_(
"German, Middle High (ca.1050-1500)" ) },
534 {
"goh", NULL,
N_(
"German, Old High (ca.750-1050)" ) },
536 {
"gon", NULL,
N_(
"Gondi" ) },
538 {
"gor", NULL,
N_(
"Gorontalo" ) },
540 {
"got", NULL,
N_(
"Gothic" ) },
542 {
"grb", NULL,
N_(
"Grebo" ) },
544 {
"grc", NULL,
N_(
"Greek, Ancient (to 1453)" ) },
546 {
"gre",
"el",
N_(
"Greek, Modern (1453-)" ) },
548 {
"ell", NULL,
N_(
"Greek, Modern (1453-)" ) },
550 {
"grn",
"gn",
N_(
"Guarani" ) },
552 {
"guj",
"gu",
N_(
"Gujarati" ) },
554 {
"gwi", NULL,
N_(
"Gwich'in" ) },
556 {
"hai", NULL,
N_(
"Haida" ) },
558 {
"hat",
"ht",
N_(
"Haitian" ) },
560 {
"hau",
"ha",
N_(
"Hausa" ) },
562 {
"haw", NULL,
N_(
"Hawaiian" ) },
564 {
"heb",
"he",
N_(
"Hebrew" ) },
566 {
"her",
"hz",
N_(
"Herero" ) },
568 {
"hil", NULL,
N_(
"Hiligaynon" ) },
570 {
"him", NULL,
N_(
"Himachali" ) },
572 {
"hin",
"hi",
N_(
"Hindi" ) },
574 {
"hit", NULL,
N_(
"Hittite" ) },
576 {
"hmn", NULL,
N_(
"Hmong" ) },
578 {
"hmo",
"ho",
N_(
"Hiri Motu" ) },
580 {
"hsb", NULL,
N_(
"Upper Sorbian" ) },
582 {
"hun",
"hu",
N_(
"Hungarian" ) },
584 {
"hup", NULL,
N_(
"Hupa" ) },
586 {
"iba", NULL,
N_(
"Iban" ) },
588 {
"ibo",
"ig",
N_(
"Igbo" ) },
590 {
"ice",
"is",
N_(
"Icelandic" ) },
592 {
"isl", NULL,
N_(
"Icelandic" ) },
594 {
"ido",
"io",
N_(
"Ido" ) },
596 {
"iii",
"ii",
N_(
"Sichuan Yi" ) },
598 {
"ijo", NULL,
N_(
"Ijo" ) },
600 {
"iku",
"iu",
N_(
"Inuktitut" ) },
602 {
"ile",
"ie",
N_(
"Interlingue" ) },
604 {
"ilo", NULL,
N_(
"Iloko" ) },
606 {
"ina",
"ia",
N_(
"Interlingua (International Auxiliary Language Association)" ) },
608 {
"inc", NULL,
N_(
"Indic (Other)" ) },
610 {
"ind",
"id",
N_(
"Indonesian" ) },
612 {
"ine", NULL,
N_(
"Indo-European (Other)" ) },
614 {
"inh", NULL,
N_(
"Ingush" ) },
616 {
"ipk",
"ik",
N_(
"Inupiaq" ) },
618 {
"ira", NULL,
N_(
"Iranian (Other)" ) },
620 {
"iro", NULL,
N_(
"Iroquoian Languages" ) },
622 {
"ita",
"it",
N_(
"Italian" ) },
624 {
"jav",
"jv",
N_(
"Javanese" ) },
626 {
"jbo", NULL,
N_(
"Lojban" ) },
628 {
"jpn",
"ja",
N_(
"Japanese" ) },
630 {
"jpr", NULL,
N_(
"Judeo-Persian" ) },
632 {
"jrb", NULL,
N_(
"Judeo-Arabic" ) },
634 {
"kaa", NULL,
N_(
"Kara-Kalpak" ) },
636 {
"kab", NULL,
N_(
"Kabyle" ) },
638 {
"kac", NULL,
N_(
"Kachin" ) },
640 {
"kal",
"kl",
N_(
"Kalaallisut" ) },
642 {
"kam", NULL,
N_(
"Kamba" ) },
644 {
"kan",
"kn",
N_(
"Kannada" ) },
646 {
"kar", NULL,
N_(
"Karen" ) },
648 {
"kas",
"ks",
N_(
"Kashmiri" ) },
650 {
"kau",
"kr",
N_(
"Kanuri" ) },
652 {
"kaw", NULL,
N_(
"Kawi" ) },
654 {
"kaz",
"kk",
N_(
"Kazakh" ) },
656 {
"kbd", NULL,
N_(
"Kabardian" ) },
658 {
"kha", NULL,
N_(
"Khasi" ) },
660 {
"khi", NULL,
N_(
"Khoisan (Other)" ) },
662 {
"khm",
"km",
N_(
"Khmer" ) },
664 {
"kho", NULL,
N_(
"Khotanese" ) },
666 {
"kik",
"ki",
N_(
"Kikuyu" ) },
668 {
"kin",
"rw",
N_(
"Kinyarwanda" ) },
670 {
"kir",
"ky",
N_(
"Kirghiz" ) },
672 {
"kmb", NULL,
N_(
"Kimbundu" ) },
674 {
"kok", NULL,
N_(
"Konkani" ) },
676 {
"kom",
"kv",
N_(
"Komi" ) },
678 {
"kon",
"kg",
N_(
"Kongo" ) },
680 {
"kor",
"ko",
N_(
"Korean" ) },
682 {
"kos", NULL,
N_(
"Kosraean" ) },
684 {
"kpe", NULL,
N_(
"Kpelle" ) },
686 {
"krc", NULL,
N_(
"Karachay-Balkar" ) },
688 {
"kro", NULL,
N_(
"Kru" ) },
690 {
"kru", NULL,
N_(
"Kurukh" ) },
692 {
"kua",
"kj",
N_(
"Kuanyama" ) },
694 {
"kum", NULL,
N_(
"Kumyk" ) },
696 {
"kur",
"ku",
N_(
"Kurdish" ) },
698 {
"kut", NULL,
N_(
"Kutenai" ) },
700 {
"lad", NULL,
N_(
"Ladino" ) },
702 {
"lah", NULL,
N_(
"Lahnda" ) },
704 {
"lam", NULL,
N_(
"Lamba" ) },
706 {
"lao",
"lo",
N_(
"Lao" ) },
708 {
"lat",
"la",
N_(
"Latin" ) },
710 {
"lav",
"lv",
N_(
"Latvian" ) },
712 {
"lez", NULL,
N_(
"Lezghian" ) },
714 {
"lim",
"li",
N_(
"Limburgan" ) },
716 {
"lin",
"ln",
N_(
"Lingala" ) },
718 {
"lit",
"lt",
N_(
"Lithuanian" ) },
720 {
"lol", NULL,
N_(
"Mongo" ) },
722 {
"loz", NULL,
N_(
"Lozi" ) },
724 {
"ltz",
"lb",
N_(
"Luxembourgish" ) },
726 {
"lua", NULL,
N_(
"Luba-Lulua" ) },
728 {
"lub",
"lu",
N_(
"Luba-Katanga" ) },
730 {
"lug",
"lg",
N_(
"Ganda" ) },
732 {
"lui", NULL,
N_(
"Luiseno" ) },
734 {
"lun", NULL,
N_(
"Lunda" ) },
736 {
"luo", NULL,
N_(
"Luo (Kenya and Tanzania)" ) },
738 {
"lus", NULL,
N_(
"Lushai" ) },
740 {
"mac",
"mk",
N_(
"Macedonian" ) },
742 {
"mkd", NULL,
N_(
"Macedonian" ) },
744 {
"mad", NULL,
N_(
"Madurese" ) },
746 {
"mag", NULL,
N_(
"Magahi" ) },
748 {
"mah",
"mh",
N_(
"Marshallese" ) },
750 {
"mai", NULL,
N_(
"Maithili" ) },
752 {
"mak", NULL,
N_(
"Makasar" ) },
754 {
"mal",
"ml",
N_(
"Malayalam" ) },
756 {
"man", NULL,
N_(
"Mandingo" ) },
758 {
"mao",
"mi",
N_(
"Maori" ) },
760 {
"mri", NULL,
N_(
"Maori" ) },
762 {
"map", NULL,
N_(
"Austronesian (Other)" ) },
764 {
"mar",
"mr",
N_(
"Marathi" ) },
766 {
"mas", NULL,
N_(
"Masai" ) },
768 {
"may",
"ms",
N_(
"Malay" ) },
770 {
"msa", NULL,
N_(
"Malay" ) },
772 {
"mdf", NULL,
N_(
"Moksha" ) },
774 {
"mdr", NULL,
N_(
"Mandar" ) },
776 {
"men", NULL,
N_(
"Mende" ) },
778 {
"mga", NULL,
N_(
"Irish, Middle (900-1200)" ) },
780 {
"mic", NULL,
N_(
"Mi'kmaq" ) },
782 {
"min", NULL,
N_(
"Minangkabau" ) },
784 {
"mis", NULL,
N_(
"Miscellaneous Languages" ) },
786 {
"mkh", NULL,
N_(
"Mon-Khmer (Other)" ) },
788 {
"mlg",
"mg",
N_(
"Malagasy" ) },
790 {
"mlt",
"mt",
N_(
"Maltese" ) },
792 {
"mnc", NULL,
N_(
"Manchu" ) },
794 {
"mni", NULL,
N_(
"Manipuri" ) },
796 {
"mno", NULL,
N_(
"Manobo Languages" ) },
798 {
"moh", NULL,
N_(
"Mohawk" ) },
800 {
"mol",
"mo",
N_(
"Moldavian" ) },
802 {
"mon",
"mn",
N_(
"Mongolian" ) },
804 {
"mos", NULL,
N_(
"Mossi" ) },
806 {
"mul", NULL,
N_(
"Multiple Languages" ) },
808 {
"mun", NULL,
N_(
"Munda languages" ) },
810 {
"mus", NULL,
N_(
"Creek" ) },
812 {
"mwl", NULL,
N_(
"Mirandese" ) },
814 {
"mwr", NULL,
N_(
"Marwari" ) },
816 {
"myn", NULL,
N_(
"Mayan Languages" ) },
818 {
"myv", NULL,
N_(
"Erzya" ) },
820 {
"nah", NULL,
N_(
"Nahuatl" ) },
822 {
"nai", NULL,
N_(
"North American Indian" ) },
824 {
"nap", NULL,
N_(
"Neapolitan" ) },
826 {
"nau",
"na",
N_(
"Nauru" ) },
828 {
"nav",
"nv",
N_(
"Navajo" ) },
830 {
"nbl",
"nr",
N_(
"Ndebele, South" ) },
832 {
"nde",
"nd",
N_(
"Ndebele, North" ) },
834 {
"ndo",
"ng",
N_(
"Ndonga" ) },
836 {
"nds", NULL,
N_(
"Low German" ) },
838 {
"nep",
"ne",
N_(
"Nepali" ) },
840 {
"new", NULL,
N_(
"Nepal Bhasa" ) },
842 {
"nia", NULL,
N_(
"Nias" ) },
844 {
"nic", NULL,
N_(
"Niger-Kordofanian (Other)" ) },
846 {
"niu", NULL,
N_(
"Niuean" ) },
848 {
"nno",
"nn",
N_(
"Norwegian Nynorsk" ) },
850 {
"nob",
"nb",
N_(
"Norwegian Bokmal" ) },
852 {
"nog", NULL,
N_(
"Nogai" ) },
854 {
"non", NULL,
N_(
"Norse, Old" ) },
856 {
"nor",
"no",
N_(
"Norwegian" ) },
858 {
"nso", NULL,
N_(
"Northern Sotho" ) },
860 {
"nub", NULL,
N_(
"Nubian Languages" ) },
862 {
"nwc", NULL,
N_(
"Classical Newari" ) },
864 {
"nya",
"ny",
N_(
"Chichewa" ) },
866 {
"nym", NULL,
N_(
"Nyamwezi" ) },
868 {
"nyn", NULL,
N_(
"Nyankole" ) },
870 {
"nyo", NULL,
N_(
"Nyoro" ) },
872 {
"nzi", NULL,
N_(
"Nzima" ) },
874 {
"oci",
"oc",
N_(
"Occitan (post 1500)" ) },
876 {
"oji",
"oj",
N_(
"Ojibwa" ) },
878 {
"ori",
"or",
N_(
"Oriya" ) },
880 {
"orm",
"om",
N_(
"Oromo" ) },
882 {
"osa", NULL,
N_(
"Osage" ) },
884 {
"oss",
"os",
N_(
"Ossetian" ) },
886 {
"ota", NULL,
N_(
"Turkish, Ottoman (1500-1928)" ) },
888 {
"oto", NULL,
N_(
"Otomian Languages" ) },
890 {
"paa", NULL,
N_(
"Papuan (Other)" ) },
892 {
"pag", NULL,
N_(
"Pangasinan" ) },
894 {
"pal", NULL,
N_(
"Pahlavi" ) },
896 {
"pam", NULL,
N_(
"Pampanga" ) },
898 {
"pan",
"pa",
N_(
"Panjabi" ) },
900 {
"pap", NULL,
N_(
"Papiamento" ) },
902 {
"pau", NULL,
N_(
"Palauan" ) },
904 {
"peo", NULL,
N_(
"Persian, Old (ca.600-400 B.C.)" ) },
906 {
"per",
"fa",
N_(
"Persian" ) },
908 {
"fas", NULL,
N_(
"Persian" ) },
910 {
"phi", NULL,
N_(
"Philippine (Other)" ) },
912 {
"phn", NULL,
N_(
"Phoenician" ) },
914 {
"pli",
"pi",
N_(
"Pali" ) },
916 {
"pol",
"pl",
N_(
"Polish" ) },
918 {
"pon", NULL,
N_(
"Pohnpeian" ) },
920 {
"por",
"pt",
N_(
"Portuguese" ) },
922 {
"pra", NULL,
N_(
"Prakrit Languages" ) },
924 {
"pro", NULL,
N_(
"Provencal, Old (to 1500)" ) },
926 {
"pus",
"ps",
N_(
"Pushto" ) },
928 {
"que",
"qu",
N_(
"Quechua" ) },
930 {
"raj", NULL,
N_(
"Rajasthani" ) },
932 {
"rap", NULL,
N_(
"Rapanui" ) },
934 {
"rar", NULL,
N_(
"Rarotongan" ) },
936 {
"roa", NULL,
N_(
"Romance (Other)" ) },
938 {
"roh",
"rm",
N_(
"Raeto-Romance" ) },
940 {
"rom", NULL,
N_(
"Romany" ) },
942 {
"rum",
"ro",
N_(
"Romanian" ) },
944 {
"ron", NULL,
N_(
"Romanian" ) },
946 {
"run",
"rn",
N_(
"Rundi" ) },
948 {
"rus",
"ru",
N_(
"Russian" ) },
950 {
"sad", NULL,
N_(
"Sandawe" ) },
952 {
"sag",
"sg",
N_(
"Sango" ) },
954 {
"sah", NULL,
N_(
"Yakut" ) },
956 {
"sai", NULL,
N_(
"South American Indian (Other)" ) },
958 {
"sal", NULL,
N_(
"Salishan Languages" ) },
960 {
"sam", NULL,
N_(
"Samaritan Aramaic" ) },
962 {
"san",
"sa",
N_(
"Sanskrit" ) },
964 {
"sas", NULL,
N_(
"Sasak" ) },
966 {
"sat", NULL,
N_(
"Santali" ) },
968 {
"scc",
"sr",
N_(
"Serbian" ) },
970 {
"srp", NULL,
N_(
"Serbian" ) },
972 {
"scn", NULL,
N_(
"Sicilian" ) },
974 {
"sco", NULL,
N_(
"Scots" ) },
976 {
"scr",
"hr",
N_(
"Croatian" ) },
978 {
"hrv", NULL,
N_(
"Croatian" ) },
980 {
"sel", NULL,
N_(
"Selkup" ) },
982 {
"sem", NULL,
N_(
"Semitic (Other)" ) },
984 {
"sga", NULL,
N_(
"Irish, Old (to 900)" ) },
986 {
"sgn", NULL,
N_(
"Sign Languages" ) },
988 {
"shn", NULL,
N_(
"Shan" ) },
990 {
"sid", NULL,
N_(
"Sidamo" ) },
992 {
"sin",
"si",
N_(
"Sinhala" ) },
994 {
"sio", NULL,
N_(
"Siouan Languages" ) },
996 {
"sit", NULL,
N_(
"Sino-Tibetan (Other)" ) },
998 {
"sla", NULL,
N_(
"Slavic (Other)" ) },
1000 {
"slo",
"sk",
N_(
"Slovak" ) },
1002 {
"slk", NULL,
N_(
"Slovak" ) },
1004 {
"slv",
"sl",
N_(
"Slovenian" ) },
1006 {
"sma", NULL,
N_(
"Southern Sami" ) },
1008 {
"sme",
"se",
N_(
"Northern Sami" ) },
1010 {
"smi", NULL,
N_(
"Sami Languages (Other)" ) },
1012 {
"smj", NULL,
N_(
"Lule Sami" ) },
1014 {
"smn", NULL,
N_(
"Inari Sami" ) },
1016 {
"smo",
"sm",
N_(
"Samoan" ) },
1018 {
"sms", NULL,
N_(
"Skolt Sami" ) },
1020 {
"sna",
"sn",
N_(
"Shona" ) },
1022 {
"snd",
"sd",
N_(
"Sindhi" ) },
1024 {
"snk", NULL,
N_(
"Soninke" ) },
1026 {
"sog", NULL,
N_(
"Sogdian" ) },
1028 {
"som",
"so",
N_(
"Somali" ) },
1030 {
"son", NULL,
N_(
"Songhai" ) },
1032 {
"sot",
"st",
N_(
"Sotho, Southern" ) },
1034 {
"spa",
"es",
N_(
"Spanish" ) },
1036 {
"srd",
"sc",
N_(
"Sardinian" ) },
1038 {
"srr", NULL,
N_(
"Serer" ) },
1040 {
"ssa", NULL,
N_(
"Nilo-Saharan (Other)" ) },
1042 {
"ssw",
"ss",
N_(
"Swati" ) },
1044 {
"suk", NULL,
N_(
"Sukuma" ) },
1046 {
"sun",
"su",
N_(
"Sundanese" ) },
1048 {
"sus", NULL,
N_(
"Susu" ) },
1050 {
"sux", NULL,
N_(
"Sumerian" ) },
1052 {
"swa",
"sw",
N_(
"Swahili" ) },
1054 {
"swe",
"sv",
N_(
"Swedish" ) },
1056 {
"syr", NULL,
N_(
"Syriac" ) },
1058 {
"tah",
"ty",
N_(
"Tahitian" ) },
1060 {
"tai", NULL,
N_(
"Tai (Other)" ) },
1062 {
"tam",
"ta",
N_(
"Tamil" ) },
1064 {
"tat",
"tt",
N_(
"Tatar" ) },
1066 {
"tel",
"te",
N_(
"Telugu" ) },
1068 {
"tem", NULL,
N_(
"Timne" ) },
1070 {
"ter", NULL,
N_(
"Tereno" ) },
1072 {
"tet", NULL,
N_(
"Tetum" ) },
1074 {
"tgk",
"tg",
N_(
"Tajik" ) },
1076 {
"tgl",
"tl",
N_(
"Tagalog" ) },
1078 {
"tha",
"th",
N_(
"Thai" ) },
1080 {
"tib",
"bo",
N_(
"Tibetan" ) },
1082 {
"bod", NULL,
N_(
"Tibetan" ) },
1084 {
"tig", NULL,
N_(
"Tigre" ) },
1086 {
"tir",
"ti",
N_(
"Tigrinya" ) },
1088 {
"tiv", NULL,
N_(
"Tiv" ) },
1090 {
"tkl", NULL,
N_(
"Tokelau" ) },
1092 {
"tlh", NULL,
N_(
"Klingon" ) },
1094 {
"tli", NULL,
N_(
"Tlingit" ) },
1096 {
"tmh", NULL,
N_(
"Tamashek" ) },
1098 {
"tog", NULL,
N_(
"Tonga (Nyasa)" ) },
1100 {
"ton",
"to",
N_(
"Tonga (Tonga Islands)" ) },
1102 {
"tpi", NULL,
N_(
"Tok Pisin" ) },
1104 {
"tsi", NULL,
N_(
"Tsimshian" ) },
1106 {
"tsn",
"tn",
N_(
"Tswana" ) },
1108 {
"tso",
"ts",
N_(
"Tsonga" ) },
1110 {
"tuk",
"tk",
N_(
"Turkmen" ) },
1112 {
"tum", NULL,
N_(
"Tumbuka" ) },
1114 {
"tup", NULL,
N_(
"Tupi Languages" ) },
1116 {
"tur",
"tr",
N_(
"Turkish" ) },
1118 {
"tut", NULL,
N_(
"Altaic (Other)" ) },
1120 {
"tvl", NULL,
N_(
"Tuvalu" ) },
1122 {
"twi",
"tw",
N_(
"Twi" ) },
1124 {
"tyv", NULL,
N_(
"Tuvinian" ) },
1126 {
"udm", NULL,
N_(
"Udmurt" ) },
1128 {
"uga", NULL,
N_(
"Ugaritic" ) },
1130 {
"uig",
"ug",
N_(
"Uighur" ) },
1132 {
"ukr",
"uk",
N_(
"Ukrainian" ) },
1134 {
"umb", NULL,
N_(
"Umbundu" ) },
1136 {
"und", NULL,
N_(
"Undetermined" ) },
1138 {
"urd",
"ur",
N_(
"Urdu" ) },
1140 {
"uzb",
"uz",
N_(
"Uzbek" ) },
1142 {
"vai", NULL,
N_(
"Vai" ) },
1144 {
"ven",
"ve",
N_(
"Venda" ) },
1146 {
"vie",
"vi",
N_(
"Vietnamese" ) },
1148 {
"vol",
"vo",
N_(
"Volapuk" ) },
1150 {
"vot", NULL,
N_(
"Votic" ) },
1152 {
"wak", NULL,
N_(
"Wakashan Languages" ) },
1154 {
"wal", NULL,
N_(
"Walamo" ) },
1156 {
"war", NULL,
N_(
"Waray" ) },
1158 {
"was", NULL,
N_(
"Washo" ) },
1160 {
"wel",
"cy",
N_(
"Welsh" ) },
1162 {
"cym", NULL,
N_(
"Welsh" ) },
1164 {
"wen", NULL,
N_(
"Sorbian Languages" ) },
1166 {
"wln",
"wa",
N_(
"Walloon" ) },
1168 {
"wol",
"wo",
N_(
"Wolof" ) },
1170 {
"xal", NULL,
N_(
"Kalmyk" ) },
1172 {
"xho",
"xh",
N_(
"Xhosa" ) },
1174 {
"yao", NULL,
N_(
"Yao" ) },
1176 {
"yap", NULL,
N_(
"Yapese" ) },
1178 {
"yid",
"yi",
N_(
"Yiddish" ) },
1180 {
"yor",
"yo",
N_(
"Yoruba" ) },
1182 {
"ypk", NULL,
N_(
"Yupik Languages" ) },
1184 {
"zap", NULL,
N_(
"Zapotec" ) },
1186 {
"zen", NULL,
N_(
"Zenaga" ) },
1188 {
"zha",
"za",
N_(
"Zhuang" ) },
1190 {
"znd", NULL,
N_(
"Zande" ) },
1192 {
"zul",
"zu",
N_(
"Zulu" ) },
1194 {
"zun", NULL,
N_(
"Zuni" ) },
1196 { NULL, NULL, NULL }
1199 for (
const LangInit * i = langInit; i->iso639_2 != NULL; ++i)
1201 std::string name( i->name );
1202 codes[i->iso639_2] = name;
1203 if (i->iso639_1 != NULL)
1204 codes[i->iso639_1] = name;
static const LanguageCode noCode
No or empty code.
LanguageCode()
Default ctor.
CodeMaps::Index _index
index into code map.
#define N_(MSG)
Just tag text for translation.
static shared_ptr< Impl > nullimpl()
Offer default Impl.
std::string code() const
Return the language code.
std::string name() const
Return the language name; if not available the language code.
RW_pointer< Impl > _pimpl
Pointer to implementation.
Impl(const std::string &code_r)
#define _(MSG)
Return translated text.
std::string toLower(const std::string &s)
Return lowercase version of s.
CodeMap codes
All the codes.
Language codes (iso639_2/iso639_1).
LanguageCode implementation.