moved the language and country lists OUT of the database and into properties

files as they are likely to change VERY infrequently; this simplifies a lot
of bits of code that would otherwise have to call through VeniceEngine, etc.
Also folded the LocaleFactory class method into the new International object
used for managing the lists.
This commit is contained in:
Eric J. Bowersox
2001-11-16 22:12:14 +00:00
parent 33eecf87fc
commit 313a46818f
30 changed files with 1001 additions and 985 deletions

View File

@@ -0,0 +1,82 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (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.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.util;
/**
* A utility class used by <CODE>International</CODE> that stores a country code and name pair.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
* @see International
*/
public final class Country
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private String code; // the country code
private String name; // the country name
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>Country</CODE> object.
*
* @param code The country code.
* @param name The country name.
*/
Country(String code, String name)
{
this.code = code.trim().toUpperCase();
this.name = name.trim();
} // end constructor
/*--------------------------------------------------------------------------------
* External getters
*--------------------------------------------------------------------------------
*/
/**
* Returns the 2-letter country code for this country.
*
* @return The 2-letter country code for this country.
*/
public final String getCode()
{
return code;
} // end code
/**
* Returns the name of this country.
*
* @return The name of this country.
*/
public final String getName()
{
return name;
} // end name
} // end class Country

View File

@@ -0,0 +1,269 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (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.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.util;
import java.io.*;
import java.util.*;
/**
* A class which centralizes a number of "international" resources, such as locales,
* country lists, and language lists.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class International
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static International self = new International(); // me
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private List country_list = null; // list of Country objects
private Map country_map = null; // mapping from codes to Country objects
private List language_list = null; // list of Language objects
private Map language_map = null; // mapping from codes to Language objects
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new instance of the <CODE>International</CODE> object. Only one instance
* of this object is ever created.
*/
private International()
{ // do nothing
} // end constructor
/*--------------------------------------------------------------------------------
* Internal operations
*--------------------------------------------------------------------------------
*/
/**
* Loads the internal list of countries from a resource file.
*
* @exception RuntimeException If an I/O error occurred while loading the country list.
*/
private synchronized void loadCountryList()
{
if ((country_list!=null) || (country_map!=null))
return; // already loaded
// Create temporary list and map to hold read data.
ArrayList tmp_list = new ArrayList();
HashMap tmp_map = new HashMap();
try
{ // Load the country properties file.
BufferedReader data =
new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("countries.properties")));
String l; // temporary line
while ((l = data.readLine())!=null)
{ // read lines from the properties file
l = l.trim();
if ((l.length()==0) || (l.startsWith("#")))
continue; // blank line or comment line
int pos = l.indexOf('=');
if (pos<0)
continue; // no properties - just forget this line
Country c = new Country(l.substring(0,pos),l.substring(pos+1));
tmp_list.add(c);
tmp_map.put(c.getCode(),c);
} // end while
} // end try
catch (IOException e)
{ // IO error loading country properties...
throw new RuntimeException("Error loading country.properties: " + e.getMessage());
} // end catch
// Set up the lists, which are considered "unmodifiable."
tmp_list.trimToSize();
country_list = Collections.unmodifiableList(tmp_list);
country_map = Collections.unmodifiableMap(tmp_map);
} // end loadCountryList
/**
* Loads the internal list of languages from a resource file.
*
* @exception RuntimeException If an I/O error occurred while loading the language list.
*/
private synchronized void loadLanguageList()
{
if ((language_list!=null) || (language_map!=null))
return; // already loaded
// Create temporary list and map to hold read data.
ArrayList tmp_list = new ArrayList();
HashMap tmp_map = new HashMap();
try
{ // Load the language properties file.
BufferedReader data =
new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("languages.properties")));
String l; // temporary line
while ((l = data.readLine())!=null)
{ // read lines from the properties file
l = l.trim();
if ((l.length()==0) || (l.startsWith("#")))
continue; // blank line or comment line
int pos = l.indexOf('=');
if (pos<0)
continue; // no properties - just forget this line
Language lng = new Language(l.substring(0,pos),l.substring(pos+1));
tmp_list.add(lng);
tmp_map.put(lng.getCode(),lng);
} // end while
} // end try
catch (IOException e)
{ // IO error loading language properties...
throw new RuntimeException("Error loading language.properties: " + e.getMessage());
} // end catch
// Set up the lists, which are considered "unmodifiable."
tmp_list.trimToSize();
language_list = Collections.unmodifiableList(tmp_list);
language_map = Collections.unmodifiableMap(tmp_map);
} // end loadLanguageList
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
/**
* Returns the list of defined countries.
*
* @return The list of <CODE>Country</CODE> objects that are currently defined.
*/
public List getCountryList()
{
loadCountryList();
return country_list;
} // end getCountryList
/**
* Returns the <CODE>Country</CODE> object with the specified code.
*
* @param code The country code to match.
* @return The matching <CODE>Country</CODE> object, or <CODE>null</CODE> if no country matched.
*/
public Country getCountryForCode(String code)
{
if (code==null)
return null;
loadCountryList();
return (Country)(country_map.get(code.trim().toUpperCase()));
} // end getCountryForCode
/**
* Returns the list of defined languages.
*
* @return The list of <CODE>Language</CODE> objects that are currently defined.
*/
public List getLanguageList()
{
loadLanguageList();
return language_list;
} // end getLanguageList
/**
* Returns the <CODE>Language</CODE> object with the specified code.
*
* @param code The language code to match.
* @return The matching <CODE>Language</CODE> object, or <CODE>null</CODE> if no language matched.
*/
public Language getLanguageForCode(String code)
{
if (code==null)
return null;
loadLanguageList();
return (Language)(language_map.get(code.trim()));
} // end getLanguageForCode
/**
* Creates a <CODE>Locale</CODE> from a standard descriptor string.
*
* @param streq The string equivalent of the Locale to be created.
* @return The corresponding <CODE>Locale</CODE>, or the default <CODE>Locale</CODE> if the parameter is
* <CODE>null</CODE> or the empty string.
*/
public Locale createLocale(String streq)
{
if ((streq==null) || (streq.length()==0))
return Locale.getDefault(); // no locale
int p1 = streq.indexOf('_');
if (p1<0)
return new Locale(streq,""); // language but no country specified
String x_lang = streq.substring(0,p1);
int p2 = streq.indexOf('_',p1+1);
if (p2<0)
{ // there's only one underscore - figure out what part the last part is
String lastpart = streq.substring(p1+1);
if (lastpart.length()==2)
return new Locale(x_lang,lastpart); // language + country
else
return new Locale(x_lang,"",lastpart); // language + country(null) + variant
} // end if
// do all three variants
return new Locale(x_lang,streq.substring(p1+1,p2),streq.substring(p2+1));
} // end createLocale
/*--------------------------------------------------------------------------------
* External static operations
*--------------------------------------------------------------------------------
*/
/**
* Returns the singleton instance of the <CODE>International</CODE> object.
*
* @return The singleton instance of the <CODE>International</CODE> object.
*/
public static International get()
{
return self;
} // end get()
} // end class International

View File

@@ -0,0 +1,82 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (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.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.util;
/**
* A utility class used by <CODE>International</CODE> that stores a language code and name pair.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
* @see International
*/
public final class Language
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private String code; // the language code
private String name; // the language name
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>Language</CODE> object.
*
* @param code The language code.
* @param name The language name.
*/
Language(String code, String name)
{
this.code = code.trim();
this.name = name.trim();
} // end constructor
/*--------------------------------------------------------------------------------
* External getters
*--------------------------------------------------------------------------------
*/
/**
* Returns the RFC 1766 language code for this language.
*
* @return The RFC 1766 language code for this language.
*/
public final String getCode()
{
return code;
} // end code
/**
* Returns the name of this language.
*
* @return The name of this language.
*/
public final String getName()
{
return name;
} // end name
} // end class Language

View File

@@ -1,78 +0,0 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (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.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.util;
import java.util.*;
/**
* A utility class which creates <CODE>Locale</CODE> objects from standard descriptor strings.
* The descriptor strings are of the form returned by <CODE>Locale.toString()</CODE>.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
* @see java.util.Locale
* @see java.util.Locale#toString()
*/
public class LocaleFactory
{
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
private LocaleFactory()
{ // this object cannot be instantiated
} // end constructor
/*--------------------------------------------------------------------------------
* External static operations
*--------------------------------------------------------------------------------
*/
/**
* Creates a <CODE>Locale</CODE> from a standard descriptor string.
*
* @param streq The string equivalent of the Locale to be created.
* @return The corresponding <CODE>Locale</CODE>, or the default <CODE>Locale</CODE> if the parameter is
* <CODE>null</CODE> or the empty string.
*/
public static Locale createLocale(String streq)
{
if ((streq==null) || (streq.length()==0))
return Locale.getDefault(); // no locale
int p1 = streq.indexOf('_');
if (p1<0)
return new Locale(streq,""); // language but no country specified
String x_lang = streq.substring(0,p1);
int p2 = streq.indexOf('_',p1+1);
if (p2<0)
{ // there's only one underscore - figure out what part the last part is
String lastpart = streq.substring(p1+1);
if (lastpart.length()==2)
return new Locale(x_lang,lastpart); // language + country
else
return new Locale(x_lang,"",lastpart); // language + country(null) + variant
} // end if
// do all three variants
return new Locale(x_lang,streq.substring(p1+1,p2),streq.substring(p2+1));
} // end createLocale
} // end class LocaleFactory

View File

@@ -0,0 +1,261 @@
# The contents of this file are subject to the Mozilla Public License Version 1.1
# (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.mozilla.org/MPL/>.
#
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
# language governing rights and limitations under the License.
#
# The Original Code is the Venice Web Communities System.
#
# The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
# for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
# Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
#
# Contributor(s):
# -------------------------------------------------------------------------------------
# This list of countries is taken from the ISO 3166 standard list of country names and
# 2-letter codes <http://www.din.de/gremien/nas/nabd/iso3166ma/>. When adding new
# entries to this file, make sure and add it in sorted order by country NAME! You can
# re-sort the country entries with "sort -t = -k 2 input > output", but then make sure
# the "XX=(unknown)" entry appears first!
XX=(unknown)
AF=Afghanistan
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
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
KH=Cambodia
CM=Cameroon
CA=Canada
CV=Cape Verde
KY=Cayman Islands
CF=Central African Republic
TD=Chad
CL=Chile
CN=China
CX=Chrismas Island
CC=Cocos (Keeling) Islands
CO=Colombia
KM=Comoros
CG=Congo
CD=Congo (Democratic Republic of)
CK=Cook Islands
CR=Costa Rica
CI=Cote D''Ivoire
HR=Croatia
CU=Cuba
CY=Cyprus
CZ=Czech Republic
DK=Denmark
DJ=Djibouti
DM=Dominica
DO=Dominican Republic
TP=East Timor
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
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
IL=Israel
IT=Italy
JM=Jamaica
JP=Japan
JO=Jordan
KZ=Kazakhstan
KE=Kenya
KI=Kiribati
KP=Korea (Democratic People's Republic of)
KO=Korea (Republic of)
KW=Kuwait
KG=Kyrgyzstan
LA=Lao People's Democratic Republic
LV=Latvia
LB=Lebanon
LS=Lesotho
LR=Liberia
LY=Libyan Arab Jamahirya
LI=Liechtenstein
LT=Lithuania
LU=Luxembourg
MO=Macau
MK=Macedonia (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
MS=Montserrat
MA=Morocco
MZ=Mozambique
MM=Myanmar
NA=Namibia
NR=Nauru
NP=Nepal
NL=Netherlands
AN=Netherlands Antillies
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=Palestinian Territory, Occupied
PA=Panama
PG=Papua New Guinea
PY=Paraguay
PE=Peru
PH=Phillipines
PN=Pitcairn
PL=Poland
PT=Portugal
PR=Puerto Rico
QA=Qatar
RE=Reunion
RO=Romania
RU=Russian Federation
RW=Rwanda
SH=Saint Helena
KN=Saint Kitts and Nevis
LC=Saint Lucia
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
SC=Seychelles
SL=Sierra Leone
SG=Singapore
SK=Slovakia
SI=Slovenia
SB=Solomon Islands
SO=Somalia
ZA=South Africa
GS=South Georgia and the South Sandwich Islands
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 (Province of China)
TJ=Tajikistan
TZ=Tanzania, United Republic of
TH=Thailand
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=Vanatu
VE=Venezuela
VN=Viet Nam
VG=Virgin Islands (British)
VI=Virgin Islands (U.S.)
WF=Wallis and Futuna
EH=Western Sahara
YE=Yemen
YU=Yugoslavia
ZM=Zambia
ZW=Zimbabwe

View File

@@ -0,0 +1,247 @@
# The contents of this file are subject to the Mozilla Public License Version 1.1
# (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.mozilla.org/MPL/>.
#
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
# language governing rights and limitations under the License.
#
# The Original Code is the Venice Web Communities System.
#
# The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
# for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
# Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
#
# Contributor(s):
# -------------------------------------------------------------------------------------
# This list of languages is styled on RFC 1766, based on ISO 639 language code listings,
# from <http://www.w3.org/WAI/ER/IG/ert/iso639.htm>, and ISO 3166 country code listings,
# from <http://www.din.de/gremien/nas/nabd/iso3166ma/>. Language variants by country taken
# from WINNT.H header file, Microsoft Windows Platform SDK. Additional language codes
# (i- names and expanded zh- names) from IANA, <ftp://ftp.isi.edu/in-notes/iana/assignments/languages/>.
# Changes to Indonesian, Hebrew, and Yiddish noted from Java 2 SDK documentation.
# When adding new entries to this file, make sure and add it in sorted order by language NAME!
# You can re-sort the language entries with "sort -t = -k 2 input > output", but then make sure
# the "i-default=(unknown)" entry appears first!
i-default=(unknown)
ab=Abkhazian
aa=Afar
af=Afrikaans
sq=Albanian
am=Amharic
i-ami=Amis
ar=Arabic
ar-DZ=Arabic (Algeria)
ar-BH=Arabic (Bahrain)
ar-EG=Arabic (Egypt)
ar-IQ=Arabic (Iraq)
ar-JO=Arabic (Jordan)
ar-KW=Arabic (Kuwait)
ar-LB=Arabic (Lebanon)
ar-LY=Arabic (Libya)
ar-MA=Arabic (Morocco)
ar-OM=Arabic (Oman)
ar-QA=Arabic (Qatar)
ar-SA=Arabic (Saudi Arabia)
ar-SY=Arabic (Syria)
ar-TN=Arabic (Tunisia)
ar-AE=Arabic (U.A.E.)
ar-YE=Arabic (Yemen)
hy=Armenian
as=Assamese
ay=Aymara
az=Azerbaijani
ba=Bashkir
eu=Basque
bn=Bengali
dz=Bhutani
bh=Bihari
bi=Bislama
br=Breton
bg=Bulgarian
i-bnn=Bunun
my=Burmese
be=Byelorussian
km=Cambodian
ca=Catalan
zh=Chinese
zh-yue=Chinese (Cantonese)
zh-gan=Chinese (Gan)
zh-hakka=Chinese (Hakka)
zh-HK=Chinese (Hong Kong)
zh-xiang=Chinese (Hunan)
zh-guoyu=Chinese (Mandarin)
zh-wuu=Chinese (Shanghai)
zh-CN=Chinese (Simplified)
zh-SG=Chinese (Singapore)
zh-min=Chinese (Taiwanese)
zh-TW=Chinese (Traditional)
co=Corsican
hr=Croatian
cs=Czech
da=Danish
nl=Dutch
nl-BE=Dutch (Belgian)
en=English
en-AU=English (Australian)
en-BZ=English (Belize)
en-CA=English (Canadian)
en-caribbean=English (Caribbean)
en-IE=English (Irish)
en-JM=English (Jamaica)
en-NZ=English (New Zealand)
en-scouse=English (Scouse)
en-ZA=English (South Africa)
en-TT=English (Trinidad)
en-GB=English (United Kingdom)
en-US=English (United States)
eo=Esperanto
et=Estonian
fo=Faeroese
fj=Fiji
fi=Finnish
fr=French
fr-BE=French (Belgian)
fr-CA=French (Canadian)
fr-LU=French (Luxembourg)
fr-CH=French (Swiss)
fy=Frisian
gl=Galician
ka=Georgian
de=German
de-AT=German (Austria)
de-LI=German (Liechtenstein)
de-LU=German (Luxembourg)
de-CH=German (Swiss)
el=Greek
kl=Greenlandic
gn=Guarani
gu=Gujarati
i-hak=Hakka
ha=Hausa
he=Hebrew
hi=Hindi
hu=Hungarian
is=Icelandic
id=Indonesian
ia=Interlingua
ie=Interlingue
ik=Inupiak
ga=Irish
it=Italian
it-CH=Italian (Swiss)
ja=Japanese
jw=Javanese
kn=Kannada
ks=Kashmiri
kk=Kazakh
rw=Kinyarwanda
ky=Kirghiz
rn=Kirundi
i-klingon=Klingon
ko=Korean
ko-johab=Korean (Johab)
ku=Kurdish
lo=Laothian
la=Latin
lv=Latvian
ln=Lingala
lt=Lithuanian
i-lux=Luxembourgish
mk=Macedonian
mg=Malagasi
ms=Malay
ml=Malayalam
mt=Maltese
mi=Maori
mr=Marathi
i-mingo=Mingo
mo=Moldavian
mn=Mongolian
na=Nauru
i-navajo=Navajo
ne=Nepali
no=Norwegian
no-bok=Norwegian (Bokmal)
no-nyn=Norwegian (Nynorsk)
oc=Occitan
or=Oriya
om=Oromo
i-pwn=Paiwan
ps=Pashto
fa=Persian
pl=Polish
pt=Portuguese
pt-BR=Portuguese (Brazilian)
pa=Punjabi
qu=Quechua
rm=Rhaeto-Romance
ro=Romanian
ru=Russian
sm=Samoan
sg=Sangro
sa=Sanskrit
gd=Scots Gaelic
sr-cyrillic=Serbian (Cyrillic)
sr=Serbian (Latin)
sh=Serbo-Croatian
st=Sesotho
tn=Setswana
sn=Shona
sd=Sindhi
si=Singhalese
ss=Siswati
sk=Slovak
sl=Slovenian
so=Somali
es-AR=Spanish (Argentina)
es-BO=Spanish (Bolivia)
es-ES=Spanish (Castilian)
es-CL=Spanish (Chile)
es-CO=Spanish (Colombia)
es-CR=Spanish (Costa Rica)
es-DO=Spanish (Dominican Republic)
es-EC=Spanish (Ecuador)
es-SV=Spanish (El Salvador)
es-GT=Spanish (Guatemala)
es-HN=Spanish (Honduras)
es-MX=Spanish (Mexican)
es=Spanish (Modern)
es-NI=Spanish (Nicaragua)
es-PA=Spanish (Panama)
es-PY=Spanish (Paraguay)
es-PE=Spanish (Peru)
es-PR=Spanish (Puerto Rico)
es-UY=Spanish (Uruguay)
es-VE=Spanish (Venezuela)
su=Sudanese
sw=Swahili
sv=Swedish
sv-FI=Swedish (Finland)
tl=Tagalog
tg=Tajik
ta=Tamil
i-tao=Tao
tt=Tatar
i-tay=Tayal
te=Tegulu
th=Thai
bo=Tibetan
ti=Tigrinya
to=Tonga
ts=Tsonga
i-tsu=Tsou
tr=Turkish
tk=Turkmen
tw=Twi
uk=Ukrainian
ur=Urdu
uz=Uzbek
vi=Vietnamese
vo=Volapuk
cy=Welsh
wo=Wolof
xh=Xhosa
yi=Yiddish
yo=Yoruba
zu=Zulu