1 /*****************************************************************************
2 * iso_lang.c: function to decode language code (in dvd or a52 for instance).
3 *****************************************************************************
4 * Copyright (C) 1998-2001 VideoLAN
5 * $Id: iso_lang.c,v 1.1 2001/11/07 17:37:16 stef Exp $
7 * Author: Stéphane Borel <stef@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
34 /*****************************************************************************
36 *****************************************************************************/
45 /* The ISO 639 language codes.
46 * Language names with * prefix are not spelled in their own language
48 { " ", "Not Specified" },
50 { "ab", "*Abkhazian" },
51 { "af", "*Afrikaans" },
54 { "as", "*Assamese" },
56 { "az", "*Azerbaijani" },
58 { "be", "*Byelorussian" },
59 { "bg", "*Bulgarian" },
62 { "bn", "*Bengali; Bangla" },
66 { "co", "*Corsican" },
67 { "cs", "*Czech(Ceske)" },
74 { "eo", "*Esperanto" },
76 { "et", "*Estonian" },
85 { "gd", "*Scots Gaelic" },
86 { "gl", "*Galician" },
88 { "gu", "*Gujarati" },
90 { "he", "*Hebrew" }, /* formerly iw */
92 { "hr", "Hrvatski" }, /* Croatian */
94 { "hy", "*Armenian" },
95 { "ia", "*Interlingua" },
96 { "id", "*Indonesian" }, /* formerly in */
97 { "ie", "*Interlingue" },
99 { "in", "*Indonesian" }, /* replaced by id */
100 { "is", "Islenska" },
101 { "it", "Italiano" },
102 { "iu", "*Inuktitut" },
103 { "iw", "*Hebrew" }, /* replaced by he */
104 { "ja", "*Japanese" },
105 { "ji", "*Yiddish" }, /* replaced by yi */
106 { "jw", "*Javanese" },
107 { "ka", "*Georgian" },
109 { "kl", "*Greenlandic" },
110 { "km", "*Cambodian" },
111 { "kn", "*Kannada" },
113 { "ks", "*Kashmiri" },
114 { "ku", "*Kurdish" },
115 { "ky", "*Kirghiz" },
117 { "ln", "*Lingala" },
118 { "lo", "*Laothian" },
119 { "lt", "*Lithuanian" },
120 { "lv", "*Latvian, Lettish" },
121 { "mg", "*Malagasy" },
123 { "mk", "*Macedonian" },
124 { "ml", "*Malayalam" },
125 { "mn", "*Mongolian" },
126 { "mo", "*Moldavian" },
127 { "mr", "*Marathi" },
129 { "mt", "*Maltese" },
130 { "my", "*Burmese" },
133 { "nl", "Nederlands" },
135 { "oc", "*Occitan" },
136 { "om", "*(Afan) Oromo" },
138 { "pa", "*Punjabi" },
140 { "ps", "*Pashto, Pushto" },
141 { "pt", "Portugues" },
142 { "qu", "*Quechua" },
143 { "rm", "*Rhaeto-Romance" },
144 { "rn", "*Kirundi" },
145 { "ro", "*Romanian" },
146 { "ru", "*Russian" },
147 { "rw", "*Kinyarwanda" },
148 { "sa", "*Sanskrit" },
151 { "sh", "*Serbo-Croatian" },
152 { "si", "*Sinhalese" },
154 { "sl", "*Slovenian" },
158 { "sq", "*Albanian" },
159 { "sr", "*Serbian" },
160 { "ss", "*Siswati" },
161 { "st", "*Sesotho" },
162 { "su", "*Sundanese" },
164 { "sw", "*Swahili" },
169 { "ti", "*Tigrinya" },
170 { "tk", "*Turkmen" },
171 { "tl", "*Tagalog" },
172 { "tn", "*Setswana" },
174 { "tr", "*Turkish" },
179 { "uk", "*Ukrainian" },
182 { "vi", "*Vietnamese" },
183 { "vo", "*Volapuk" },
186 { "yi", "*Yiddish" }, /* formerly ji */
189 { "zh", "*Chinese" },
194 /*****************************************************************************
195 * DecodeLanguage: gives the long language name from the two-letters
197 *****************************************************************************/
198 char * DecodeLanguage( u16 i_code )
202 while( memcmp( lang_tbl[i].p_code, &i_code, 2 ) &&
203 lang_tbl[i].p_lang_long[0] )
208 return lang_tbl[i].p_lang_long;