Update wmts-hidpi, add nicer-api-docs

This commit is contained in:
Andreas Hocevar
2014-05-06 13:02:46 -05:00
parent b3ac1afd00
commit 1e25fc5585
2239 changed files with 3726515 additions and 37010 deletions

View File

@@ -0,0 +1,291 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Current list of countries of the world. This list uses
* CLDR xml files for data. Algorithm is to list all country codes
* that are not containments (representing a group of countries) and does
* have a territory alias (old countries).
*
* Warning: this file is automatically generated from CLDR.
* Please contact i18n team or change the script and regenerate data.
* Code location: http://go/cldr_scripts:generate_countries
*
*/
/**
* Namespace for current country codes.
*/
goog.provide('goog.locale.countries');
/**
* List of codes for countries valid today.
* @type {Array}
*/
/* ~!@# Countries #@!~ (special comment meaningful to generation script) */
goog.locale.countries = [
'AD',
'AE',
'AF',
'AG',
'AI',
'AL',
'AM',
'AO',
'AQ',
'AR',
'AS',
'AT',
'AU',
'AW',
'AX',
'AZ',
'BA',
'BB',
'BD',
'BE',
'BF',
'BG',
'BH',
'BI',
'BJ',
'BL',
'BM',
'BN',
'BO',
'BQ',
'BR',
'BS',
'BT',
'BV',
'BW',
'BY',
'BZ',
'CA',
'CC',
'CD',
'CF',
'CG',
'CH',
'CI',
'CK',
'CL',
'CM',
'CN',
'CO',
'CR',
'CU',
'CV',
'CW',
'CX',
'CY',
'CZ',
'DE',
'DJ',
'DK',
'DM',
'DO',
'DZ',
'EC',
'EE',
'EG',
'EH',
'ER',
'ES',
'ET',
'FI',
'FJ',
'FK',
'FM',
'FO',
'FR',
'GA',
'GB',
'GD',
'GE',
'GF',
'GG',
'GH',
'GI',
'GL',
'GM',
'GN',
'GP',
'GQ',
'GR',
'GS',
'GT',
'GU',
'GW',
'GY',
'HK',
'HM',
'HN',
'HR',
'HT',
'HU',
'ID',
'IE',
'IL',
'IM',
'IN',
'IO',
'IQ',
'IR',
'IS',
'IT',
'JE',
'JM',
'JO',
'JP',
'KE',
'KG',
'KH',
'KI',
'KM',
'KN',
'KP',
'KR',
'KW',
'KY',
'KZ',
'LA',
'LB',
'LC',
'LI',
'LK',
'LR',
'LS',
'LT',
'LU',
'LV',
'LY',
'MA',
'MC',
'MD',
'ME',
'MF',
'MG',
'MH',
'MK',
'ML',
'MM',
'MN',
'MO',
'MP',
'MQ',
'MR',
'MS',
'MT',
'MU',
'MV',
'MW',
'MX',
'MY',
'MZ',
'NA',
'NC',
'NE',
'NF',
'NG',
'NI',
'NL',
'NO',
'NP',
'NR',
'NU',
'NZ',
'OM',
'PA',
'PE',
'PF',
'PG',
'PH',
'PK',
'PL',
'PM',
'PN',
'PR',
'PS',
'PT',
'PW',
'PY',
'QA',
'RE',
'RO',
'RS',
'RU',
'RW',
'SA',
'SB',
'SC',
'SD',
'SE',
'SG',
'SH',
'SI',
'SJ',
'SK',
'SL',
'SM',
'SN',
'SO',
'SR',
'SS',
'ST',
'SV',
'SX',
'SY',
'SZ',
'TC',
'TD',
'TF',
'TG',
'TH',
'TJ',
'TK',
'TL',
'TM',
'TN',
'TO',
'TR',
'TT',
'TV',
'TW',
'TZ',
'UA',
'UG',
'UM',
'US',
'UY',
'UZ',
'VA',
'VC',
'VE',
'VG',
'VI',
'VN',
'VU',
'WF',
'WS',
'YE',
'YT',
'ZA',
'ZM',
'ZW'
];
/* ~!@# END #@!~ */

View File

@@ -0,0 +1,907 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Default list of locale specific country and language names.
*
* Warning: this file is automatically generated from CLDR.
* File generated from CLDR ver. 23
* Please contact i18n team or change the script and regenerate data.
* Code location: http://go/generate_js_lang_country_constants
*
*/
/**
* Namespace for locale specific country and lanugage names
*/
goog.provide('goog.locale.defaultLocaleNameConstants');
/**
* Default list of locale specific country and language names
*/
goog.locale.defaultLocaleNameConstants = {
'COUNTRY': {
'001': 'World',
'002': 'Africa',
'003': 'North America',
'005': 'South America',
'009': 'Oceania',
'011': 'Western Africa',
'013': 'Central America',
'014': 'Eastern Africa',
'015': 'Northern Africa',
'017': 'Middle Africa',
'018': 'Southern Africa',
'019': 'Americas',
'021': 'Northern America',
'029': 'Caribbean',
'030': 'Eastern Asia',
'034': 'Southern Asia',
'035': 'South-Eastern Asia',
'039': 'Southern Europe',
'053': 'Australasia',
'054': 'Melanesia',
'057': 'Micronesian Region',
'061': 'Polynesia',
'142': 'Asia',
'143': 'Central Asia',
'145': 'Western Asia',
'150': 'Europe',
'151': 'Eastern Europe',
'154': 'Northern Europe',
'155': 'Western Europe',
'419': 'Latin America',
'AC': 'Ascension Island',
'AD': 'Andorra',
'AE': 'United Arab Emirates',
'AF': 'Afghanistan',
'AG': 'Antigua and Barbuda',
'AI': 'Anguilla',
'AL': 'Albania',
'AM': 'Armenia',
'AN': 'Netherlands Antilles',
'AO': 'Angola',
'AQ': 'Antarctica',
'AR': 'Argentina',
'AS': 'American Samoa',
'AT': 'Austria',
'AU': 'Australia',
'AW': 'Aruba',
'AX': '\u00c5land Islands',
'AZ': 'Azerbaijan',
'BA': 'Bosnia and Herzegovina',
'BB': 'Barbados',
'BD': 'Bangladesh',
'BE': 'Belgium',
'BF': 'Burkina Faso',
'BG': 'Bulgaria',
'BH': 'Bahrain',
'BI': 'Burundi',
'BJ': 'Benin',
'BL': 'Saint Barth\u00e9lemy',
'BM': 'Bermuda',
'BN': 'Brunei',
'BO': 'Bolivia',
'BQ': 'Caribbean Netherlands',
'BR': 'Brazil',
'BS': 'Bahamas',
'BT': 'Bhutan',
'BV': 'Bouvet Island',
'BW': 'Botswana',
'BY': 'Belarus',
'BZ': 'Belize',
'CA': 'Canada',
'CC': 'Cocos [Keeling] Islands',
'CD': 'Congo [DRC]',
'CF': 'Central African Republic',
'CG': 'Congo [Republic]',
'CH': 'Switzerland',
'CI': 'C\u00f4te d\u2019Ivoire',
'CK': 'Cook Islands',
'CL': 'Chile',
'CM': 'Cameroon',
'CN': 'China',
'CO': 'Colombia',
'CP': 'Clipperton Island',
'CR': 'Costa Rica',
'CU': 'Cuba',
'CV': 'Cape Verde',
'CW': 'Cura\u00e7ao',
'CX': 'Christmas Island',
'CY': 'Cyprus',
'CZ': 'Czech Republic',
'DE': 'Germany',
'DG': 'Diego Garcia',
'DJ': 'Djibouti',
'DK': 'Denmark',
'DM': 'Dominica',
'DO': 'Dominican Republic',
'DZ': 'Algeria',
'EA': 'Ceuta and Melilla',
'EC': 'Ecuador',
'EE': 'Estonia',
'EG': 'Egypt',
'EH': 'Western Sahara',
'ER': 'Eritrea',
'ES': 'Spain',
'ET': 'Ethiopia',
'EU': 'European Union',
'FI': 'Finland',
'FJ': 'Fiji',
'FK': 'Falkland Islands [Islas Malvinas]',
'FM': 'Micronesia',
'FO': 'Faroe Islands',
'FR': 'France',
'GA': 'Gabon',
'GB': 'United Kingdom',
'GD': 'Grenada',
'GE': 'Georgia',
'GF': 'French Guiana',
'GG': 'Guernsey',
'GH': 'Ghana',
'GI': 'Gibraltar',
'GL': 'Greenland',
'GM': 'Gambia',
'GN': 'Guinea',
'GP': 'Guadeloupe',
'GQ': 'Equatorial Guinea',
'GR': 'Greece',
'GS': 'South Georgia and the South Sandwich Islands',
'GT': 'Guatemala',
'GU': 'Guam',
'GW': 'Guinea-Bissau',
'GY': 'Guyana',
'HK': 'Hong Kong',
'HM': 'Heard Island and McDonald Islands',
'HN': 'Honduras',
'HR': 'Croatia',
'HT': 'Haiti',
'HU': 'Hungary',
'IC': 'Canary Islands',
'ID': 'Indonesia',
'IE': 'Ireland',
'IL': 'Israel',
'IM': 'Isle of Man',
'IN': 'India',
'IO': 'British Indian Ocean Territory',
'IQ': 'Iraq',
'IR': 'Iran',
'IS': 'Iceland',
'IT': 'Italy',
'JE': 'Jersey',
'JM': 'Jamaica',
'JO': 'Jordan',
'JP': 'Japan',
'KE': 'Kenya',
'KG': 'Kyrgyzstan',
'KH': 'Cambodia',
'KI': 'Kiribati',
'KM': 'Comoros',
'KN': 'Saint Kitts and Nevis',
'KP': 'North Korea',
'KR': 'South Korea',
'KW': 'Kuwait',
'KY': 'Cayman Islands',
'KZ': 'Kazakhstan',
'LA': 'Laos',
'LB': 'Lebanon',
'LC': 'Saint Lucia',
'LI': 'Liechtenstein',
'LK': 'Sri Lanka',
'LR': 'Liberia',
'LS': 'Lesotho',
'LT': 'Lithuania',
'LU': 'Luxembourg',
'LV': 'Latvia',
'LY': 'Libya',
'MA': 'Morocco',
'MC': 'Monaco',
'MD': 'Moldova',
'ME': 'Montenegro',
'MF': 'Saint Martin',
'MG': 'Madagascar',
'MH': 'Marshall Islands',
'MK': 'Macedonia [FYROM]',
'ML': 'Mali',
'MM': 'Myanmar [Burma]',
'MN': 'Mongolia',
'MO': 'Macau',
'MP': 'Northern Mariana Islands',
'MQ': 'Martinique',
'MR': 'Mauritania',
'MS': 'Montserrat',
'MT': 'Malta',
'MU': 'Mauritius',
'MV': 'Maldives',
'MW': 'Malawi',
'MX': 'Mexico',
'MY': 'Malaysia',
'MZ': 'Mozambique',
'NA': 'Namibia',
'NC': 'New Caledonia',
'NE': 'Niger',
'NF': 'Norfolk Island',
'NG': 'Nigeria',
'NI': 'Nicaragua',
'NL': 'Netherlands',
'NO': 'Norway',
'NP': 'Nepal',
'NR': 'Nauru',
'NU': 'Niue',
'NZ': 'New Zealand',
'OM': 'Oman',
'PA': 'Panama',
'PE': 'Peru',
'PF': 'French Polynesia',
'PG': 'Papua New Guinea',
'PH': 'Philippines',
'PK': 'Pakistan',
'PL': 'Poland',
'PM': 'Saint Pierre and Miquelon',
'PN': 'Pitcairn Islands',
'PR': 'Puerto Rico',
'PS': 'Palestine',
'PT': 'Portugal',
'PW': 'Palau',
'PY': 'Paraguay',
'QA': 'Qatar',
'QO': 'Outlying Oceania',
'RE': 'R\u00e9union',
'RO': 'Romania',
'RS': 'Serbia',
'RU': 'Russia',
'RW': 'Rwanda',
'SA': 'Saudi Arabia',
'SB': 'Solomon Islands',
'SC': 'Seychelles',
'SD': 'Sudan',
'SE': 'Sweden',
'SG': 'Singapore',
'SH': 'Saint Helena',
'SI': 'Slovenia',
'SJ': 'Svalbard and Jan Mayen',
'SK': 'Slovakia',
'SL': 'Sierra Leone',
'SM': 'San Marino',
'SN': 'Senegal',
'SO': 'Somalia',
'SR': 'Suriname',
'SS': 'South Sudan',
'ST': 'S\u00e3o Tom\u00e9 and Pr\u00edncipe',
'SV': 'El Salvador',
'SX': 'Sint Maarten',
'SY': 'Syria',
'SZ': 'Swaziland',
'TA': 'Tristan da Cunha',
'TC': 'Turks and Caicos Islands',
'TD': 'Chad',
'TF': 'French Southern Territories',
'TG': 'Togo',
'TH': 'Thailand',
'TJ': 'Tajikistan',
'TK': 'Tokelau',
'TL': 'Timor-Leste',
'TM': 'Turkmenistan',
'TN': 'Tunisia',
'TO': 'Tonga',
'TR': 'Turkey',
'TT': 'Trinidad and Tobago',
'TV': 'Tuvalu',
'TW': 'Taiwan',
'TZ': 'Tanzania',
'UA': 'Ukraine',
'UG': 'Uganda',
'UM': 'U.S. Outlying Islands',
'US': 'United States',
'UY': 'Uruguay',
'UZ': 'Uzbekistan',
'VA': 'Vatican City',
'VC': 'Saint Vincent and the Grenadines',
'VE': 'Venezuela',
'VG': 'British Virgin Islands',
'VI': 'U.S. Virgin Islands',
'VN': 'Vietnam',
'VU': 'Vanuatu',
'WF': 'Wallis and Futuna',
'WS': 'Samoa',
'XK': 'Kosovo',
'YE': 'Yemen',
'YT': 'Mayotte',
'ZA': 'South Africa',
'ZM': 'Zambia',
'ZW': 'Zimbabwe',
'ZZ': 'Unknown Region'
},
'LANGUAGE': {
'aa': 'Afar',
'ab': 'Abkhazian',
'ace': 'Achinese',
'ach': 'Acoli',
'ada': 'Adangme',
'ady': 'Adyghe',
'ae': 'Avestan',
'af': 'Afrikaans',
'afa': 'Afro-Asiatic Language',
'afh': 'Afrihili',
'agq': 'Aghem',
'ain': 'Ainu',
'ak': 'Akan',
'akk': 'Akkadian',
'ale': 'Aleut',
'alg': 'Algonquian Language',
'alt': 'Southern Altai',
'am': 'Amharic',
'an': 'Aragonese',
'ang': 'Old English',
'anp': 'Angika',
'apa': 'Apache Language',
'ar': 'Arabic',
'ar_001': 'Modern Standard Arabic',
'arc': 'Aramaic',
'arn': 'Mapuche',
'arp': 'Arapaho',
'art': 'Artificial Language',
'arw': 'Arawak',
'as': 'Assamese',
'asa': 'Asu',
'ast': 'Asturian',
'ath': 'Athapascan Language',
'aus': 'Australian Language',
'av': 'Avaric',
'awa': 'Awadhi',
'ay': 'Aymara',
'az': 'Azerbaijani',
'ba': 'Bashkir',
'bad': 'Banda',
'bai': 'Bamileke Language',
'bal': 'Baluchi',
'ban': 'Balinese',
'bas': 'Basaa',
'bat': 'Baltic Language',
'bax': 'Bamun',
'bbj': 'Ghomala',
'be': 'Belarusian',
'bej': 'Beja',
'bem': 'Bemba',
'ber': 'Berber',
'bez': 'Bena',
'bfd': 'Bafut',
'bg': 'Bulgarian',
'bh': 'Bihari',
'bho': 'Bhojpuri',
'bi': 'Bislama',
'bik': 'Bikol',
'bin': 'Bini',
'bkm': 'Kom',
'bla': 'Siksika',
'bm': 'Bambara',
'bn': 'Bengali',
'bnt': 'Bantu',
'bo': 'Tibetan',
'br': 'Breton',
'bra': 'Braj',
'brx': 'Bodo',
'bs': 'Bosnian',
'bss': 'Akoose',
'btk': 'Batak',
'bua': 'Buriat',
'bug': 'Buginese',
'bum': 'Bulu',
'byn': 'Blin',
'byv': 'Medumba',
'ca': 'Catalan',
'cad': 'Caddo',
'cai': 'Central American Indian Language',
'car': 'Carib',
'cau': 'Caucasian Language',
'cay': 'Cayuga',
'cch': 'Atsam',
'ce': 'Chechen',
'ceb': 'Cebuano',
'cel': 'Celtic Language',
'cgg': 'Chiga',
'ch': 'Chamorro',
'chb': 'Chibcha',
'chg': 'Chagatai',
'chk': 'Chuukese',
'chm': 'Mari',
'chn': 'Chinook Jargon',
'cho': 'Choctaw',
'chp': 'Chipewyan',
'chr': 'Cherokee',
'chy': 'Cheyenne',
'ckb': 'Sorani Kurdish',
'cmc': 'Chamic Language',
'co': 'Corsican',
'cop': 'Coptic',
'cpe': 'English-based Creole or Pidgin',
'cpf': 'French-based Creole or Pidgin',
'cpp': 'Portuguese-based Creole or Pidgin',
'cr': 'Cree',
'crh': 'Crimean Turkish',
'crp': 'Creole or Pidgin',
'cs': 'Czech',
'csb': 'Kashubian',
'cu': 'Church Slavic',
'cus': 'Cushitic Language',
'cv': 'Chuvash',
'cy': 'Welsh',
'da': 'Danish',
'dak': 'Dakota',
'dar': 'Dargwa',
'dav': 'Taita',
'day': 'Dayak',
'de': 'German',
'de_AT': 'Austrian German',
'de_CH': 'Swiss High German',
'del': 'Delaware',
'den': 'Slave',
'dgr': 'Dogrib',
'din': 'Dinka',
'dje': 'Zarma',
'doi': 'Dogri',
'dra': 'Dravidian Language',
'dsb': 'Lower Sorbian',
'dua': 'Duala',
'dum': 'Middle Dutch',
'dv': 'Divehi',
'dyo': 'Jola-Fonyi',
'dyu': 'Dyula',
'dz': 'Dzongkha',
'dzg': 'Dazaga',
'ebu': 'Embu',
'ee': 'Ewe',
'efi': 'Efik',
'egy': 'Ancient Egyptian',
'eka': 'Ekajuk',
'el': 'Greek',
'elx': 'Elamite',
'en': 'English',
'en_AU': 'Australian English',
'en_CA': 'Canadian English',
'en_GB': 'British English',
'en_US': 'U.S. English',
'enm': 'Middle English',
'eo': 'Esperanto',
'es': 'Spanish',
'es_419': 'Latin American Spanish',
'es_ES': 'European Spanish',
'et': 'Estonian',
'eu': 'Basque',
'ewo': 'Ewondo',
'fa': 'Persian',
'fan': 'Fang',
'fat': 'Fanti',
'ff': 'Fulah',
'fi': 'Finnish',
'fil': 'Filipino',
'fiu': 'Finno-Ugrian Language',
'fj': 'Fijian',
'fo': 'Faroese',
'fon': 'Fon',
'fr': 'French',
'fr_CA': 'Canadian French',
'fr_CH': 'Swiss French',
'frm': 'Middle French',
'fro': 'Old French',
'frr': 'Northern Frisian',
'frs': 'Eastern Frisian',
'fur': 'Friulian',
'fy': 'Western Frisian',
'ga': 'Irish',
'gaa': 'Ga',
'gay': 'Gayo',
'gba': 'Gbaya',
'gd': 'Scottish Gaelic',
'gem': 'Germanic Language',
'gez': 'Geez',
'gil': 'Gilbertese',
'gl': 'Galician',
'gmh': 'Middle High German',
'gn': 'Guarani',
'goh': 'Old High German',
'gon': 'Gondi',
'gor': 'Gorontalo',
'got': 'Gothic',
'grb': 'Grebo',
'grc': 'Ancient Greek',
'gsw': 'Swiss German',
'gu': 'Gujarati',
'guz': 'Gusii',
'gv': 'Manx',
'gwi': 'Gwich\u02bcin',
'ha': 'Hausa',
'hai': 'Haida',
'haw': 'Hawaiian',
'he': 'Hebrew',
'hi': 'Hindi',
'hil': 'Hiligaynon',
'him': 'Himachali',
'hit': 'Hittite',
'hmn': 'Hmong',
'ho': 'Hiri Motu',
'hr': 'Croatian',
'hsb': 'Upper Sorbian',
'ht': 'Haitian',
'hu': 'Hungarian',
'hup': 'Hupa',
'hy': 'Armenian',
'hz': 'Herero',
'ia': 'Interlingua',
'iba': 'Iban',
'ibb': 'Ibibio',
'id': 'Indonesian',
'ie': 'Interlingue',
'ig': 'Igbo',
'ii': 'Sichuan Yi',
'ijo': 'Ijo',
'ik': 'Inupiaq',
'ilo': 'Iloko',
'inc': 'Indic Language',
'ine': 'Indo-European Language',
'inh': 'Ingush',
'io': 'Ido',
'ira': 'Iranian Language',
'iro': 'Iroquoian Language',
'is': 'Icelandic',
'it': 'Italian',
'iu': 'Inuktitut',
'ja': 'Japanese',
'jbo': 'Lojban',
'jgo': 'Ngomba',
'jmc': 'Machame',
'jpr': 'Judeo-Persian',
'jrb': 'Judeo-Arabic',
'jv': 'Javanese',
'ka': 'Georgian',
'kaa': 'Kara-Kalpak',
'kab': 'Kabyle',
'kac': 'Kachin',
'kaj': 'Jju',
'kam': 'Kamba',
'kar': 'Karen',
'kaw': 'Kawi',
'kbd': 'Kabardian',
'kbl': 'Kanembu',
'kcg': 'Tyap',
'kde': 'Makonde',
'kea': 'Kabuverdianu',
'kfo': 'Koro',
'kg': 'Kongo',
'kha': 'Khasi',
'khi': 'Khoisan Language',
'kho': 'Khotanese',
'khq': 'Koyra Chiini',
'ki': 'Kikuyu',
'kj': 'Kuanyama',
'kk': 'Kazakh',
'kkj': 'Kako',
'kl': 'Kalaallisut',
'kln': 'Kalenjin',
'km': 'Khmer',
'kmb': 'Kimbundu',
'kn': 'Kannada',
'ko': 'Korean',
'kok': 'Konkani',
'kos': 'Kosraean',
'kpe': 'Kpelle',
'kr': 'Kanuri',
'krc': 'Karachay-Balkar',
'krl': 'Karelian',
'kro': 'Kru',
'kru': 'Kurukh',
'ks': 'Kashmiri',
'ksb': 'Shambala',
'ksf': 'Bafia',
'ksh': 'Colognian',
'ku': 'Kurdish',
'kum': 'Kumyk',
'kut': 'Kutenai',
'kv': 'Komi',
'kw': 'Cornish',
'ky': 'Kirghiz',
'la': 'Latin',
'lad': 'Ladino',
'lag': 'Langi',
'lah': 'Lahnda',
'lam': 'Lamba',
'lb': 'Luxembourgish',
'lez': 'Lezghian',
'lg': 'Ganda',
'li': 'Limburgish',
'lkt': 'Lakota',
'ln': 'Lingala',
'lo': 'Lao',
'lol': 'Mongo',
'loz': 'Lozi',
'lt': 'Lithuanian',
'lu': 'Luba-Katanga',
'lua': 'Luba-Lulua',
'lui': 'Luiseno',
'lun': 'Lunda',
'luo': 'Luo',
'lus': 'Mizo',
'luy': 'Luyia',
'lv': 'Latvian',
'mad': 'Madurese',
'maf': 'Mafa',
'mag': 'Magahi',
'mai': 'Maithili',
'mak': 'Makasar',
'man': 'Mandingo',
'map': 'Austronesian Language',
'mas': 'Masai',
'mde': 'Maba',
'mdf': 'Moksha',
'mdr': 'Mandar',
'men': 'Mende',
'mer': 'Meru',
'mfe': 'Morisyen',
'mg': 'Malagasy',
'mga': 'Middle Irish',
'mgh': 'Makhuwa-Meetto',
'mgo': 'Meta\'',
'mh': 'Marshallese',
'mi': 'Maori',
'mic': 'Micmac',
'min': 'Minangkabau',
'mis': 'Miscellaneous Language',
'mk': 'Macedonian',
'mkh': 'Mon-Khmer Language',
'ml': 'Malayalam',
'mn': 'Mongolian',
'mnc': 'Manchu',
'mni': 'Manipuri',
'mno': 'Manobo Language',
'mo': 'Moldavian',
'moh': 'Mohawk',
'mos': 'Mossi',
'mr': 'Marathi',
'ms': 'Malay',
'mt': 'Maltese',
'mua': 'Mundang',
'mul': 'Multiple Languages',
'mun': 'Munda Language',
'mus': 'Creek',
'mwl': 'Mirandese',
'mwr': 'Marwari',
'my': 'Burmese',
'mye': 'Myene',
'myn': 'Mayan Language',
'myv': 'Erzya',
'na': 'Nauru',
'nah': 'Nahuatl',
'nai': 'North American Indian Language',
'nap': 'Neapolitan',
'naq': 'Nama',
'nb': 'Norwegian Bokm\u00e5l',
'nd': 'North Ndebele',
'nds': 'Low German',
'ne': 'Nepali',
'new': 'Newari',
'ng': 'Ndonga',
'nia': 'Nias',
'nic': 'Niger-Kordofanian Language',
'niu': 'Niuean',
'nl': 'Dutch',
'nl_BE': 'Flemish',
'nmg': 'Kwasio',
'nn': 'Norwegian Nynorsk',
'nnh': 'Ngiemboon',
'no': 'Norwegian',
'nog': 'Nogai',
'non': 'Old Norse',
'nqo': 'N\u2019Ko',
'nr': 'South Ndebele',
'nso': 'Northern Sotho',
'nub': 'Nubian Language',
'nus': 'Nuer',
'nv': 'Navajo',
'nwc': 'Classical Newari',
'ny': 'Nyanja',
'nym': 'Nyamwezi',
'nyn': 'Nyankole',
'nyo': 'Nyoro',
'nzi': 'Nzima',
'oc': 'Occitan',
'oj': 'Ojibwa',
'om': 'Oromo',
'or': 'Oriya',
'os': 'Ossetic',
'osa': 'Osage',
'ota': 'Ottoman Turkish',
'oto': 'Otomian Language',
'pa': 'Punjabi',
'paa': 'Papuan Language',
'pag': 'Pangasinan',
'pal': 'Pahlavi',
'pam': 'Pampanga',
'pap': 'Papiamento',
'pau': 'Palauan',
'peo': 'Old Persian',
'phi': 'Philippine Language',
'phn': 'Phoenician',
'pi': 'Pali',
'pl': 'Polish',
'pon': 'Pohnpeian',
'pra': 'Prakrit Language',
'pro': 'Old Proven\u00e7al',
'ps': 'Pashto',
'pt': 'Portuguese',
'pt_BR': 'Brazilian Portuguese',
'pt_PT': 'European Portuguese',
'qu': 'Quechua',
'raj': 'Rajasthani',
'rap': 'Rapanui',
'rar': 'Rarotongan',
'rm': 'Romansh',
'rn': 'Rundi',
'ro': 'Romanian',
'roa': 'Romance Language',
'rof': 'Rombo',
'rom': 'Romany',
'root': 'Root',
'ru': 'Russian',
'rup': 'Aromanian',
'rw': 'Kinyarwanda',
'rwk': 'Rwa',
'sa': 'Sanskrit',
'sad': 'Sandawe',
'sah': 'Sakha',
'sai': 'South American Indian Language',
'sal': 'Salishan Language',
'sam': 'Samaritan Aramaic',
'saq': 'Samburu',
'sas': 'Sasak',
'sat': 'Santali',
'sba': 'Ngambay',
'sbp': 'Sangu',
'sc': 'Sardinian',
'scn': 'Sicilian',
'sco': 'Scots',
'sd': 'Sindhi',
'se': 'Northern Sami',
'see': 'Seneca',
'seh': 'Sena',
'sel': 'Selkup',
'sem': 'Semitic Language',
'ses': 'Koyraboro Senni',
'sg': 'Sango',
'sga': 'Old Irish',
'sgn': 'Sign Language',
'sh': 'Serbo-Croatian',
'shi': 'Tachelhit',
'shn': 'Shan',
'shu': 'Chadian Arabic',
'si': 'Sinhala',
'sid': 'Sidamo',
'sio': 'Siouan Language',
'sit': 'Sino-Tibetan Language',
'sk': 'Slovak',
'sl': 'Slovenian',
'sla': 'Slavic Language',
'sm': 'Samoan',
'sma': 'Southern Sami',
'smi': 'Sami Language',
'smj': 'Lule Sami',
'smn': 'Inari Sami',
'sms': 'Skolt Sami',
'sn': 'Shona',
'snk': 'Soninke',
'so': 'Somali',
'sog': 'Sogdien',
'son': 'Songhai',
'sq': 'Albanian',
'sr': 'Serbian',
'srn': 'Sranan Tongo',
'srr': 'Serer',
'ss': 'Swati',
'ssa': 'Nilo-Saharan Language',
'ssy': 'Saho',
'st': 'Southern Sotho',
'su': 'Sundanese',
'suk': 'Sukuma',
'sus': 'Susu',
'sux': 'Sumerian',
'sv': 'Swedish',
'sw': 'Swahili',
'swb': 'Comorian',
'swc': 'Congo Swahili',
'syc': 'Classical Syriac',
'syr': 'Syriac',
'ta': 'Tamil',
'tai': 'Tai Language',
'te': 'Telugu',
'tem': 'Timne',
'teo': 'Teso',
'ter': 'Tereno',
'tet': 'Tetum',
'tg': 'Tajik',
'th': 'Thai',
'ti': 'Tigrinya',
'tig': 'Tigre',
'tiv': 'Tiv',
'tk': 'Turkmen',
'tkl': 'Tokelau',
'tl': 'Tagalog',
'tlh': 'Klingon',
'tli': 'Tlingit',
'tmh': 'Tamashek',
'tn': 'Tswana',
'to': 'Tongan',
'tog': 'Nyasa Tonga',
'tpi': 'Tok Pisin',
'tr': 'Turkish',
'trv': 'Taroko',
'ts': 'Tsonga',
'tsi': 'Tsimshian',
'tt': 'Tatar',
'tum': 'Tumbuka',
'tup': 'Tupi Language',
'tut': 'Altaic Language',
'tvl': 'Tuvalu',
'tw': 'Twi',
'twq': 'Tasawaq',
'ty': 'Tahitian',
'tyv': 'Tuvinian',
'tzm': 'Central Atlas Tamazight',
'udm': 'Udmurt',
'ug': 'Uyghur',
'uga': 'Ugaritic',
'uk': 'Ukrainian',
'umb': 'Umbundu',
'und': 'Unknown Language',
'ur': 'Urdu',
'uz': 'Uzbek',
'vai': 'Vai',
've': 'Venda',
'vi': 'Vietnamese',
'vo': 'Volap\u00fck',
'vot': 'Votic',
'vun': 'Vunjo',
'wa': 'Walloon',
'wae': 'Walser',
'wak': 'Wakashan Language',
'wal': 'Wolaytta',
'war': 'Waray',
'was': 'Washo',
'wen': 'Sorbian Language',
'wo': 'Wolof',
'xal': 'Kalmyk',
'xh': 'Xhosa',
'xog': 'Soga',
'yao': 'Yao',
'yap': 'Yapese',
'yav': 'Yangben',
'ybb': 'Yemba',
'yi': 'Yiddish',
'yo': 'Yoruba',
'ypk': 'Yupik Language',
'yue': 'Cantonese',
'za': 'Zhuang',
'zap': 'Zapotec',
'zbl': 'Blissymbols',
'zen': 'Zenaga',
'zh': 'Chinese',
'zh_Hans': 'Simplified Chinese',
'zh_Hant': 'Traditional Chinese',
'znd': 'Zande',
'zu': 'Zulu',
'zun': 'Zuni',
'zxx': 'No linguistic content',
'zza': 'Zaza'
}
};

View File

@@ -0,0 +1,73 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Functions to list locale-specific font list and generic name.
* Generic name used for a font family would be locale dependant. For example,
* for 'zh'(Chinese) users, the name for Serif family would be in Chinese.
* Further documentation at: http://go/genericfontnames.
*/
goog.provide('goog.locale.genericFontNames');
/**
* This object maps (resourceName, localeName) to a resourceObj.
* @type {Object}
* @private
*/
goog.locale.genericFontNames.data_ = {};
/**
* Normalizes the given locale id to standard form. eg: zh_Hant_TW.
* Many a times, input locale would be like: zh-tw, zh-hant-tw.
* @param {string} locale The locale id to be normalized.
* @return {string} Normalized locale id.
* @private
*/
goog.locale.genericFontNames.normalize_ = function(locale) {
locale = locale.replace(/-/g, '_');
locale = locale.replace(/_[a-z]{2}$/,
function(str) {
return str.toUpperCase();
});
locale = locale.replace(/[a-z]{4}/,
function(str) {
return str.substring(0, 1).toUpperCase() +
str.substring(1);
});
return locale;
};
/**
* Gets the list of fonts and their generic names for the given locale.
* @param {string} locale The locale for which font lists and font family names
* to be produced. The expected locale id is as described in
* http://wiki/Main/IIISynonyms in all lowercase for easy matching.
* Smallest possible id is expected.
* Examples: 'zh', 'zh-tw', 'iw' instead of 'zh-CN', 'zh-Hant-TW', 'he'.
* @return {Array.<Object>} List of objects with generic name as 'caption' and
* corresponding font name lists as 'value' property.
*/
goog.locale.genericFontNames.getList = function(locale) {
locale = goog.locale.genericFontNames.normalize_(locale);
if (locale in goog.locale.genericFontNames.data_) {
return goog.locale.genericFontNames.data_[locale];
}
return [];
};

View File

@@ -0,0 +1,327 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview List of generic font names and font fallbacks.
* This file lists the font fallback for each font family for each locale or
* script. In this map, each value is an array of pair. The pair is stored
* as an array of two elements.
*
* First element of the pair is the generic name
* for the font family in that locale. In case of script indexed entries,
* It will be just font family name. Second element in the pair is a string
* comma seperated list of font names. API to access this data is provided
* thru goog.locale.genericFontNames.
*
* Warning: this file is automatically generated from CLDR.
* Please contact i18n team or change the script and regenerate data.
* Code location: http://go/generate_genericfontnames
*
*/
/**
* Namespace for Generic Font Names
*/
goog.provide('goog.locale.genericFontNamesData');
/**
* Map from script code or language code to list of pairs of (generic name,
* font name fallback list).
* @type {Object}
*/
/* ~!@# genmethods.genericFontNamesData() #@!~ */
goog.locale.genericFontNamesData = {
'Arab': [
[
'sans-serif',
'Arial,Al Bayan'
],
[
'serif',
'Arabic Typesetting,Times New Roman'
]
],
'Armn': [[
'serif',
'Sylfaen,Mshtakan'
]],
'Beng': [[
'sans-serif',
'Vrinda,Lohit Bengali'
]],
'Cans': [[
'sans-serif',
'Euphemia,Euphemia UCAS'
]],
'Cher': [[
'serif',
'Plantagenet,Plantagenet Cherokee'
]],
'Deva': [
[
'sans-serif',
'Mangal,Lohit Hindi'
],
[
'serif',
'Arial Unicode MS,Devanagari'
]
],
'Ethi': [[
'serif',
'Nyala'
]],
'Geor': [[
'serif',
'Sylfaen'
]],
'Gujr': [
[
'sans-serif',
'Shruti,Lohit Gujarati'
],
[
'serif',
'Gujarati'
]
],
'Guru': [
[
'sans-serif',
'Raavi,Lohit Punjabi'
],
[
'serif',
'Gurmukhi'
]
],
'Hebr': [
[
'sans-serif',
'Gisha,Aharoni,Arial Hebrew'
],
[
'serif',
'David'
],
[
'monospace',
'Miriam Fixed'
]
],
'Khmr': [
[
'sans-serif',
'MoolBoran,Khmer OS'
],
[
'serif',
'DaunPenh'
]
],
'Knda': [
[
'sans-serif',
'Tunga'
],
[
'serif',
'Kedage'
]
],
'Laoo': [[
'sans-serif',
'DokChampa,Phetsarath OT'
]],
'Mlym': [
[
'sans-serif',
'AnjaliOldLipi,Kartika'
],
[
'serif',
'Rachana'
]
],
'Mong': [[
'serif',
'Mongolian Baiti'
]],
'Nkoo': [[
'serif',
'Conakry'
]],
'Orya': [[
'sans-serif',
'Kalinga,utkal'
]],
'Sinh': [[
'serif',
'Iskoola Pota,Malithi Web'
]],
'Syrc': [[
'sans-serif',
'Estrangelo Edessa'
]],
'Taml': [
[
'sans-serif',
'Latha,Lohit Tamil'
],
[
'serif',
'Inai Mathi'
]
],
'Telu': [
[
'sans-serif',
'Gautami'
],
[
'serif',
'Pothana'
]
],
'Thaa': [[
'sans-serif',
'MV Boli'
]],
'Thai': [
[
'sans-serif',
'Tahoma,Thonburi'
],
[
'monospace',
'Tahoma,Ayuthaya'
]
],
'Tibt': [[
'serif',
'Microsoft Himalaya'
]],
'Yiii': [[
'sans-serif',
'Microsoft Yi Baiti'
]],
'Zsym': [[
'sans-serif',
'Apple Symbols'
]],
'jp': [
[
'\uff30\u30b4\u30b7\u30c3\u30af',
'MS PGothic,\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af,Hiragino Kaku G' +
'othic Pro,\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4 Pro W3,Sazanami Gothic' +
',\u3055\u3056\u306a\u307f\u30b4\u30b7\u30c3\u30af,sans-serif'
],
[
'\u30e1\u30a4\u30ea\u30aa',
'Meiryo,\u30e1\u30a4\u30ea\u30aa,sans-serif'
],
[
'\uff30\u660e\u671d',
'MS PMincho,\uff2d\uff33 \uff30\u660e\u671d,Hiragino Mincho Pro,\u30d2' +
'\u30e9\u30ae\u30ce\u660e\u671d Pro W3,Sazanami Mincho,\u3055\u3056' +
'\u306a\u307f\u660e\u671d,serif'
],
[
'\u7b49\u5e45',
'MS Gothic,\uff2d\uff33 \u30b4\u30b7\u30c3\u30af,Osaka-Mono,Osaka\uff0d' +
'\u7b49\u5e45,monospace'
]
],
'ko': [
[
'\uace0\ub515',
'Gulim,\uad74\ub9bc,AppleGothic,\uc560\ud50c\uace0\ub515,UnDotum,\uc740' +
' \ub3cb\uc6c0,Baekmuk Gulim,\ubc31\ubb35 \uad74\ub9bc,sans-serif'
],
[
'\ub9d1\uc740\uace0\ub515',
'Malgun Gothic,\ub9d1\uc740\uace0\ub515,sans-serif'
],
[
'\ubc14\ud0d5',
'Batang,\ubc14\ud0d5,AppleMyungjo,\uc560\ud50c\uba85\uc870,UnBatang,' +
'\uc740 \ubc14\ud0d5,Baekmuk Batang,\ubc31\ubb35 \ubc14\ud0d5,serif'
],
[
'\uad81\uc11c',
'Gungseo,\uad81\uc11c,serif'
],
[
'\uace0\uc815\ud3ed',
'GulimChe,\uad74\ub9bc\uccb4,AppleGothic,\uc560\ud50c\uace0\ub515,monos' +
'pace'
]
],
'root': [
[
'sans-serif',
'FreeSans'
],
[
'serif',
'FreeSerif'
],
[
'monospace',
'FreeMono'
]
],
'transpose': {
'zh': {
'zh_Hant': {
'\u5b8b\u4f53': '\u65b0\u7d30\u660e\u9ad4',
'\u9ed1\u4f53': '\u5fae\u8edf\u6b63\u9ed1\u9ad4'
}
}
},
'ug': [[
'serif',
'Microsoft Uighur'
]],
'zh': [
[
'\u9ed1\u4f53',
'Microsoft JhengHei,\u5fae\u8edf\u6b63\u9ed1\u9ad4,SimHei,\u9ed1\u4f53,' +
'MS Hei,STHeiti,\u534e\u6587\u9ed1\u4f53,Apple LiGothic Medium,\u860b' +
'\u679c\u5137\u4e2d\u9ed1,LiHei Pro Medium,\u5137\u9ed1 Pro,STHeiti Li' +
'ght,\u534e\u6587\u7ec6\u9ed1,AR PL ZenKai Uni,\u6587\u9f0ePL\u4e2d' +
'\u6977Uni,sans-serif'
],
[
'\u5fae\u8f6f\u96c5\u9ed1\u5b57\u4f53',
'Microsoft YaHei,\u5fae\u8f6f\u96c5\u9ed1\u5b57\u4f53,sans-serif'
],
[
'\u5b8b\u4f53',
'SimSun,\u5b8b\u4f53,MS Song,STSong,\u534e\u6587\u5b8b\u4f53,Apple LiSu' +
'ng Light,\u860b\u679c\u5137\u7d30\u5b8b,LiSong Pro Light,\u5137\u5b8b' +
' Pro,STFangSong,\u534e\u6587\u4eff\u5b8b,AR PL ShanHeiSun Uni,\u6587' +
'\u9f0ePL\u7ec6\u4e0a\u6d77\u5b8bUni,AR PL New Sung,\u6587\u9f0e PL ' +
'\u65b0\u5b8b,serif'
],
[
'\u7d30\u660e\u9ad4',
'NSimsun,\u65b0\u5b8b\u4f53,monospace'
]
]
};
/* ~!@# END #@!~ */

View File

@@ -0,0 +1,403 @@
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Functions for dealing with Date formatting & Parsing,
* County and language name, TimeZone list.
* @suppress {deprecated} Use goog.i18n instead.
*/
/**
* Namespace for locale related functions.
*/
goog.provide('goog.locale');
goog.require('goog.locale.nativeNameConstants');
/**
* Set currnet locale to the specified one.
* @param {string} localeName Locale name string. We are following the usage
* in CLDR, but can make a few compromise for existing name compatibility.
*/
goog.locale.setLocale = function(localeName) {
// it is common to see people use '-' as locale part separator, normalize it.
localeName = localeName.replace(/-/g, '_');
goog.locale.activeLocale_ = localeName;
};
/**
* Retrieve the currnet locale
* @return {string} Current locale name string.
* @deprecated Use goog.LOCALE and goog.i18n instead.
*/
goog.locale.getLocale = function() {
if (!goog.locale.activeLocale_) {
goog.locale.activeLocale_ = 'en';
}
return goog.locale.activeLocale_;
};
// Couple of constants to represent predefined Date/Time format type.
/**
* Enum of resources that can be registered.
* @enum {string}
*/
goog.locale.Resource = {
DATE_TIME_CONSTANTS: 'DateTimeConstants',
NUMBER_FORMAT_CONSTANTS: 'NumberFormatConstants',
TIME_ZONE_CONSTANTS: 'TimeZoneConstants',
LOCAL_NAME_CONSTANTS: 'LocaleNameConstants',
TIME_ZONE_SELECTED_IDS: 'TimeZoneSelectedIds',
TIME_ZONE_SELECTED_SHORT_NAMES: 'TimeZoneSelectedShortNames',
TIME_ZONE_SELECTED_LONG_NAMES: 'TimeZoneSelectedLongNames',
TIME_ZONE_ALL_LONG_NAMES: 'TimeZoneAllLongNames'
};
// BCP 47 language code:
//
// LanguageCode := LanguageSubtag
// ("-" ScriptSubtag)?
// ("-" RegionSubtag)?
// ("-" VariantSubtag)?
// ("@" Keyword "=" Value ("," Keyword "=" Value)* )?
//
// e.g. en-Latn-GB
//
// NOTICE:
// No special format checking is performed. If you pass a none valid
// language code as parameter to the following functions,
// you might get an unexpected result.
/**
* Returns the language-subtag of the given language code.
*
* @param {string} languageCode Language code to extract language subtag from.
* @return {string} Language subtag (in lowercase).
*/
goog.locale.getLanguageSubTag = function(languageCode) {
var result = languageCode.match(/^\w{2,3}([-_]|$)/);
return result ? result[0].replace(/[_-]/g, '') : '';
};
/**
* Returns the region-sub-tag of the given language code.
*
* @param {string} languageCode Language code to extract region subtag from.
* @return {string} Region sub-tag (in uppercase).
*/
goog.locale.getRegionSubTag = function(languageCode) {
var result = languageCode.match(/[-_]([a-zA-Z]{2}|\d{3})([-_]|$)/);
return result ? result[0].replace(/[_-]/g, '') : '';
};
/**
* Returns the script subtag of the locale with the first alphabet in uppercase
* and the rest 3 characters in lower case.
*
* @param {string} languageCode Language Code to extract script subtag from.
* @return {string} Script subtag.
*/
goog.locale.getScriptSubTag = function(languageCode) {
var result = languageCode.split(/[-_]/g);
return result.length > 1 && result[1].match(/^[a-zA-Z]{4}$/) ?
result[1] : '';
};
/**
* Returns the variant-sub-tag of the given language code.
*
* @param {string} languageCode Language code to extract variant subtag from.
* @return {string} Variant sub-tag.
*/
goog.locale.getVariantSubTag = function(languageCode) {
var result = languageCode.match(/[-_]([a-z]{2,})/);
return result ? result[1] : '';
};
/**
* Returns the country name of the provided language code in its native
* language.
*
* This method depends on goog.locale.nativeNameConstants available from
* nativenameconstants.js. User of this method has to add dependency to this.
*
* @param {string} countryCode Code to lookup the country name for.
*
* @return {string} Country name for the provided language code.
*/
goog.locale.getNativeCountryName = function(countryCode) {
var key = goog.locale.getLanguageSubTag(countryCode) + '_' +
goog.locale.getRegionSubTag(countryCode);
return key in goog.locale.nativeNameConstants['COUNTRY'] ?
goog.locale.nativeNameConstants['COUNTRY'][key] : countryCode;
};
/**
* Returns the localized country name for the provided language code in the
* current or provided locale symbols set.
*
* This method depends on goog.locale.LocaleNameConstants__<locale> available
* from http://go/js_locale_data. User of this method has to add dependency to
* this.
*
* @param {string} languageCode Language code to lookup the country name for.
* @param {Object=} opt_localeSymbols If omitted the current locale symbol
* set is used.
*
* @return {string} Localized country name.
*/
goog.locale.getLocalizedCountryName = function(languageCode,
opt_localeSymbols) {
if (!opt_localeSymbols) {
opt_localeSymbols = goog.locale.getResource('LocaleNameConstants',
goog.locale.getLocale());
}
var code = goog.locale.getRegionSubTag(languageCode);
return code in opt_localeSymbols['COUNTRY'] ?
opt_localeSymbols['COUNTRY'][code] : languageCode;
};
/**
* Returns the language name of the provided language code in its native
* language.
*
* This method depends on goog.locale.nativeNameConstants available from
* nativenameconstants.js. User of this method has to add dependency to this.
*
* @param {string} languageCode Language code to lookup the language name for.
*
* @return {string} Language name for the provided language code.
*/
goog.locale.getNativeLanguageName = function(languageCode) {
if (languageCode in goog.locale.nativeNameConstants['LANGUAGE'])
return goog.locale.nativeNameConstants['LANGUAGE'][languageCode];
var code = goog.locale.getLanguageSubTag(languageCode);
return code in goog.locale.nativeNameConstants['LANGUAGE'] ?
goog.locale.nativeNameConstants['LANGUAGE'][code] : languageCode;
};
/**
* Returns the localized language name for the provided language code in
* the current or provided locale symbols set.
*
* This method depends on goog.locale.LocaleNameConstants__<locale> available
* from http://go/js_locale_data. User of this method has to add dependency to
* this.
*
* @param {string} languageCode Language code to lookup the language name for.
* @param {Object=} opt_localeSymbols locale symbol set if given.
*
* @return {string} Localized language name of the provided language code.
*/
goog.locale.getLocalizedLanguageName = function(languageCode,
opt_localeSymbols) {
if (!opt_localeSymbols) {
opt_localeSymbols = goog.locale.getResource('LocaleNameConstants',
goog.locale.getLocale());
}
if (languageCode in opt_localeSymbols['LANGUAGE'])
return opt_localeSymbols['LANGUAGE'][languageCode];
var code = goog.locale.getLanguageSubTag(languageCode);
return code in opt_localeSymbols['LANGUAGE'] ?
opt_localeSymbols['LANGUAGE'][code] : languageCode;
};
/**
* Register a resource object for certain locale.
* @param {Object} dataObj The resource object being registered.
* @param {goog.locale.Resource|string} resourceName String that represents
* the type of resource.
* @param {string} localeName Locale ID.
*/
goog.locale.registerResource = function(dataObj, resourceName, localeName) {
if (!goog.locale.resourceRegistry_[resourceName]) {
goog.locale.resourceRegistry_[resourceName] = {};
}
goog.locale.resourceRegistry_[resourceName][localeName] = dataObj;
// the first registered locale becomes active one. Usually there will be
// only one locale per js binary bundle.
if (!goog.locale.activeLocale_) {
goog.locale.activeLocale_ = localeName;
}
};
/**
* Returns true if the required resource has already been registered.
* @param {goog.locale.Resource|string} resourceName String that represents
* the type of resource.
* @param {string} localeName Locale ID.
* @return {boolean} Whether the required resource has already been registered.
*/
goog.locale.isResourceRegistered = function(resourceName, localeName) {
return resourceName in goog.locale.resourceRegistry_ &&
localeName in goog.locale.resourceRegistry_[resourceName];
};
/**
* This object maps (resourceName, localeName) to a resourceObj.
* @type {Object}
* @private
*/
goog.locale.resourceRegistry_ = {};
/**
* Registers the timezone constants object for a given locale name.
* @param {Object} dataObj The resource object.
* @param {string} localeName Locale ID.
* @deprecated Use goog.i18n.TimeZone, no longer need this.
*/
goog.locale.registerTimeZoneConstants = function(dataObj, localeName) {
goog.locale.registerResource(
dataObj, goog.locale.Resource.TIME_ZONE_CONSTANTS, localeName);
};
/**
* Registers the LocaleNameConstants constants object for a given locale name.
* @param {Object} dataObj The resource object.
* @param {string} localeName Locale ID.
*/
goog.locale.registerLocaleNameConstants = function(dataObj, localeName) {
goog.locale.registerResource(
dataObj, goog.locale.Resource.LOCAL_NAME_CONSTANTS, localeName);
};
/**
* Registers the TimeZoneSelectedIds constants object for a given locale name.
* @param {Object} dataObj The resource object.
* @param {string} localeName Locale ID.
*/
goog.locale.registerTimeZoneSelectedIds = function(dataObj, localeName) {
goog.locale.registerResource(
dataObj, goog.locale.Resource.TIME_ZONE_SELECTED_IDS, localeName);
};
/**
* Registers the TimeZoneSelectedShortNames constants object for a given
* locale name.
* @param {Object} dataObj The resource object.
* @param {string} localeName Locale ID.
*/
goog.locale.registerTimeZoneSelectedShortNames = function(dataObj, localeName) {
goog.locale.registerResource(
dataObj, goog.locale.Resource.TIME_ZONE_SELECTED_SHORT_NAMES, localeName);
};
/**
* Registers the TimeZoneSelectedLongNames constants object for a given locale
* name.
* @param {Object} dataObj The resource object.
* @param {string} localeName Locale ID.
*/
goog.locale.registerTimeZoneSelectedLongNames = function(dataObj, localeName) {
goog.locale.registerResource(
dataObj, goog.locale.Resource.TIME_ZONE_SELECTED_LONG_NAMES, localeName);
};
/**
* Registers the TimeZoneAllLongNames constants object for a given locale name.
* @param {Object} dataObj The resource object.
* @param {string} localeName Locale ID.
*/
goog.locale.registerTimeZoneAllLongNames = function(dataObj, localeName) {
goog.locale.registerResource(
dataObj, goog.locale.Resource.TIME_ZONE_ALL_LONG_NAMES, localeName);
};
/**
* Retrieve specified resource for certain locale.
* @param {string} resourceName String that represents the type of resource.
* @param {string=} opt_locale Locale ID, if not given, current locale
* will be assumed.
* @return {Object|undefined} The resource object that hold all the resource
* data, or undefined if not available.
*/
goog.locale.getResource = function(resourceName, opt_locale) {
var locale = opt_locale ? opt_locale : goog.locale.getLocale();
if (!(resourceName in goog.locale.resourceRegistry_)) {
return undefined;
}
return goog.locale.resourceRegistry_[resourceName][locale];
};
/**
* Retrieve specified resource for certain locale with fallback. For example,
* request of 'zh_CN' will be resolved in following order: zh_CN, zh, en.
* If none of the above succeeds, of if the resource as indicated by
* resourceName does not exist at all, undefined will be returned.
*
* @param {string} resourceName String that represents the type of resource.
* @param {string=} opt_locale locale ID, if not given, current locale
* will be assumed.
* @return {Object|undefined} The resource object for desired locale.
*/
goog.locale.getResourceWithFallback = function(resourceName, opt_locale) {
var locale = opt_locale ? opt_locale : goog.locale.getLocale();
if (!(resourceName in goog.locale.resourceRegistry_)) {
return undefined;
}
if (locale in goog.locale.resourceRegistry_[resourceName]) {
return goog.locale.resourceRegistry_[resourceName][locale];
}
// if locale has multiple parts (2 atmost in reality), fallback to base part.
var locale_parts = locale.split('_');
if (locale_parts.length > 1 &&
locale_parts[0] in goog.locale.resourceRegistry_[resourceName]) {
return goog.locale.resourceRegistry_[resourceName][locale_parts[0]];
}
// otherwise, fallback to 'en'
return goog.locale.resourceRegistry_[resourceName]['en'];
};
// Export global functions that are used by the date time constants files.
// See http://go/js_locale_data
var registerLocalNameConstants = goog.locale.registerLocaleNameConstants;
var registerTimeZoneSelectedIds = goog.locale.registerTimeZoneSelectedIds;
var registerTimeZoneSelectedShortNames =
goog.locale.registerTimeZoneSelectedShortNames;
var registerTimeZoneSelectedLongNames =
goog.locale.registerTimeZoneSelectedLongNames;
var registerTimeZoneAllLongNames = goog.locale.registerTimeZoneAllLongNames;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,482 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Script to Languages mapping. Typically, one script is used by
* many languages of the world. This map captures that information as a mapping
* from script to array of two letter or three letter language codes.
*
* This map is used by goog.locale.genericFontNames for listing
* font fallbacks for a font family for a locale. That file
* uses this map in conjunction with goog.locale.genericFontNamesData.
*
* Warning: this file is automatically generated from CLDR.
* Please contact i18n team or change the script and regenerate data.
* Code location: http://go/generate_genericfontnames.py
*
*/
/**
* Namespace for Script to Languages mapping
*/
goog.provide('goog.locale.scriptToLanguages');
goog.require('goog.locale');
/**
* The script code to list of language codes map.
* @type {Object}
*/
/* ~!@# genmethods.scriptToLanguages() #@!~ */
goog.locale.scriptToLanguages = {
'Arab': [
'prd',
'doi',
'lah',
'uz',
'cjm',
'swb',
'az',
'ps',
'ur',
'ks',
'fa',
'ar',
'tk',
'ku',
'tg',
'bal',
'ha',
'ky',
'ug',
'sd'
],
'Armn': ['hy'],
'Beng': [
'mni',
'grt',
'bn',
'syl',
'as',
'ril',
'ccp'
],
'Blis': ['zbl'],
'Cans': [
'cr',
'iu',
'cwd',
'crk'
],
'Cham': ['cja'],
'Cher': ['chr'],
'Cyrl': [
'ab',
'rom',
'mns',
'mdf',
'ce',
'myv',
'ude',
'sah',
'inh',
'uk',
'tab',
'av',
'yrk',
'az',
'cv',
'koi',
'ru',
'dng',
'sel',
'tt',
'chm',
'ady',
'tyv',
'abq',
'kum',
'xal',
'tg',
'cjs',
'tk',
'be',
'kaa',
'bg',
'kca',
'ba',
'nog',
'krl',
'bxr',
'kbd',
'dar',
'krc',
'lez',
'ttt',
'udm',
'evn',
'kpv',
'uz',
'kk',
'kpy',
'kjh',
'mn',
'gld',
'mk',
'ckt',
'aii',
'kv',
'ku',
'sr',
'lbe',
'ky',
'os'
],
'Deva': [
'btv',
'kfr',
'bho',
'mr',
'bhb',
'bjj',
'hi',
'mag',
'mai',
'awa',
'lif',
'xsr',
'mwr',
'kok',
'gon',
'hne',
'hoc',
'gbm',
'hoj',
'ne',
'kru',
'ks',
'bra',
'bft',
'new',
'bfy',
'sd'
],
'Ethi': [
'byn',
'wal',
'ti',
'tig',
'am'
],
'Geor': ['ka'],
'Grek': ['el'],
'Gujr': ['gu'],
'Guru': ['pa'],
'Hans': [
'zh',
'za'
],
'Hant': ['zh'],
'Hebr': [
'lad',
'yi',
'he'
],
'Jpan': ['ja'],
'Khmr': ['km'],
'Knda': [
'kn',
'tcy'
],
'Kore': ['ko'],
'Laoo': ['lo'],
'Latn': [
'gv',
'sco',
'scn',
'mfe',
'hnn',
'suk',
'tkl',
'gd',
'ga',
'gn',
'gl',
'rom',
'hai',
'lb',
'la',
'ln',
'tsg',
'tr',
'ts',
'li',
'lv',
'to',
'lt',
'lu',
'tk',
'tg',
'fo',
'fil',
'bya',
'bin',
'kcg',
'ceb',
'amo',
'yao',
'mos',
'dyu',
'de',
'tbw',
'da',
'fan',
'st',
'hil',
'fon',
'efi',
'tl',
'qu',
'uz',
'kpe',
'ban',
'bal',
'gor',
'tru',
'mo',
'mdh',
'en',
'tem',
'ee',
'tvl',
'cr',
'eu',
'et',
'tet',
'nbf',
'es',
'rw',
'lut',
'kmb',
'ast',
'sms',
'lua',
'sus',
'smj',
'fy',
'tmh',
'rm',
'rn',
'ro',
'dsb',
'sma',
'luo',
'hsb',
'wa',
'lg',
'wo',
'bm',
'jv',
'men',
'bi',
'tum',
'br',
'bs',
'smn',
'om',
'ace',
'ilo',
'ty',
'oc',
'srr',
'krl',
'tw',
'nds',
'os',
'xh',
'ch',
'co',
'nso',
'ca',
'sn',
'eo',
'son',
'pon',
'cy',
'cs',
'kfo',
'fj',
'tn',
'srn',
'pt',
'sm',
'chk',
'bbc',
'chm',
'lol',
'frs',
'frr',
'chr',
'yap',
'vi',
'kos',
'gil',
'ak',
'pl',
'sid',
'hr',
'ht',
'hu',
'hmn',
'ho',
'gag',
'buc',
'ha',
'bug',
'gaa',
'mg',
'fur',
'bem',
'ibb',
'mi',
'mh',
'war',
'mt',
'uli',
'ms',
'sr',
'haw',
'sq',
'aa',
've',
'af',
'gwi',
'is',
'it',
'sv',
'ii',
'sas',
'ik',
'tpi',
'zu',
'ay',
'kha',
'az',
'tzm',
'id',
'ig',
'pap',
'nl',
'pau',
'nn',
'no',
'na',
'nb',
'nd',
'umb',
'ng',
'ny',
'nap',
'gcr',
'nyn',
'hop',
'lis',
'so',
'nr',
'pam',
'nv',
'kv',
'kab',
'fr',
'nym',
'kaj',
'rcf',
'yo',
'snk',
'kam',
'dgr',
'mad',
'fi',
'mak',
'niu',
'kg',
'pag',
'gsw',
'ss',
'kj',
'ki',
'min',
'sw',
'cpe',
'su',
'kl',
'sk',
'kr',
'kw',
'cch',
'ku',
'sl',
'sg',
'tiv',
'se'
],
'Lepc': ['lep'],
'Limb': ['lif'],
'Mlym': ['ml'],
'Mong': [
'mnc',
'mn'
],
'Mymr': [
'my',
'kht',
'shn',
'mnw'
],
'Nkoo': [
'nqo',
'emk'
],
'Orya': ['or'],
'Sinh': ['si'],
'Tale': ['tdd'],
'Talu': ['khb'],
'Taml': [
'bfq',
'ta'
],
'Telu': [
'te',
'gon',
'lmn'
],
'Tfng': ['tzm'],
'Thaa': ['dv'],
'Thai': [
'tts',
'lwl',
'th',
'kdt',
'lcp'
],
'Tibt': [
'bo',
'dz'
],
'Yiii': ['ii'],
'und': ['sat']
};
/* ~!@# END #@!~ */

View File

@@ -0,0 +1,117 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Functions for detecting user's time zone.
* This work is based on Charlie Luo and Hong Yan's time zone detection work
* for CBG.
*/
goog.provide('goog.locale.timeZoneDetection');
goog.require('goog.locale');
goog.require('goog.locale.TimeZoneFingerprint');
/**
* Array of time instances for checking the time zone offset.
* @type {Array.<number>}
* @private
*/
goog.locale.timeZoneDetection.TZ_POKE_POINTS_ = [
1109635200, 1128902400, 1130657000, 1143333000, 1143806400, 1145000000,
1146380000, 1152489600, 1159800000, 1159500000, 1162095000, 1162075000,
1162105500];
/**
* Calculates time zone fingerprint by poking time zone offsets for 13
* preselected time points.
* See {@link goog.locale.timeZoneDetection.TZ_POKE_POINTS_}
* @param {Date} date Date for calculating the fingerprint.
* @return {number} Fingerprint of user's time zone setting.
*/
goog.locale.timeZoneDetection.getFingerprint = function(date) {
var hash = 0;
var stdOffset;
var isComplex = false;
for (var i = 0;
i < goog.locale.timeZoneDetection.TZ_POKE_POINTS_.length; i++) {
date.setTime(goog.locale.timeZoneDetection.TZ_POKE_POINTS_[i] * 1000);
var offset = date.getTimezoneOffset() / 30 + 48;
if (i == 0) {
stdOffset = offset;
} else if (stdOffset != offset) {
isComplex = true;
}
hash = (hash << 2) ^ offset;
}
return isComplex ? hash : /** @type {number} */ (stdOffset);
};
/**
* Detects browser's time zone setting. If user's country is known, a better
* time zone choice could be guessed.
* @param {string=} opt_country Two-letter ISO 3166 country code.
* @param {Date=} opt_date Date for calculating the fingerprint. Defaults to the
* current date.
* @return {string} Time zone ID of best guess.
*/
goog.locale.timeZoneDetection.detectTimeZone = function(opt_country, opt_date) {
var date = opt_date || new Date();
var fingerprint = goog.locale.timeZoneDetection.getFingerprint(date);
var timeZoneList = goog.locale.TimeZoneFingerprint[fingerprint];
// Timezones in goog.locale.TimeZoneDetection.TimeZoneMap are in the format
// US-America/Los_Angeles. Country code needs to be stripped before a
// timezone is returned.
if (timeZoneList) {
if (opt_country) {
for (var i = 0; i < timeZoneList.length; ++i) {
if (timeZoneList[i].indexOf(opt_country) == 0) {
return timeZoneList[i].substring(3);
}
}
}
return timeZoneList[0].substring(3);
}
return '';
};
/**
* Returns an array of time zones that are consistent with user's platform
* setting. If user's country is given, only the time zone for that country is
* returned.
* @param {string=} opt_country 2 letter ISO 3166 country code. Helps in making
* a better guess for user's time zone.
* @param {Date=} opt_date Date for retrieving timezone list. Defaults to the
* current date.
* @return {Array.<string>} Array of time zone IDs.
*/
goog.locale.timeZoneDetection.getTimeZoneList = function(opt_country,
opt_date) {
var date = opt_date || new Date();
var fingerprint = goog.locale.timeZoneDetection.getFingerprint(date);
var timeZoneList = goog.locale.TimeZoneFingerprint[fingerprint];
if (!timeZoneList) {
return [];
}
var chosenList = [];
for (var i = 0; i < timeZoneList.length; i++) {
if (!opt_country || timeZoneList[i].indexOf(opt_country) == 0) {
chosenList.push(timeZoneList[i].substring(3));
}
}
return chosenList;
};

View File

@@ -0,0 +1,248 @@
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Data for time zone detection.
*
* The following code was generated by the timezone_detect.py script in:
* http://go/i18n_tools which uses following files in this directory:
* http://go/timezone_data
* Files: olson2fingerprint.txt, country2olsons.txt, popular_olsons.txt
*
* After automatic generation, we added some manual editing. Projecting on
* future changes, it is very unlikely that we will need to change the time
* zone ID groups. Most of the further modifications will be about relative
* time zone order in each time zone group. The easiest way to do that is
* to modify this code directly, and that's what we decide to do.
*
*/
goog.provide('goog.locale.TimeZoneFingerprint');
/**
* Time zone fingerprint mapping to time zone list.
* @enum {Array.<string>}
*/
goog.locale.TimeZoneFingerprint = {
919994368: ['CA-America/Halifax', 'CA-America/Glace_Bay', 'GL-America/Thule',
'BM-Atlantic/Bermuda'],
6: ['AQ-Antarctica/Rothera'],
8: ['GY-America/Guyana'],
839516172: ['US-America/Denver', 'MX-America/Chihuahua', 'US-America/Boise',
'CA-America/Cambridge_Bay', 'CA-America/Edmonton', 'CA-America/Inuvik',
'MX-America/Mazatlan', 'US-America/Shiprock', 'CA-America/Yellowknife'],
983564836: ['UY-America/Montevideo'],
487587858: ['AU-Australia/Lord_Howe'],
20: ['KI-Pacific/Kiritimati'],
22: ['TO-Pacific/Tongatapu', 'KI-Pacific/Enderbury'],
24: ['FJ-Pacific/Fiji', 'TV-Pacific/Funafuti', 'MH-Pacific/Kwajalein',
'MH-Pacific/Majuro', 'NR-Pacific/Nauru', 'KI-Pacific/Tarawa',
'UM-Pacific/Wake', 'WF-Pacific/Wallis'],
25: ['NF-Pacific/Norfolk'],
26: ['RU-Asia/Magadan', 'VU-Pacific/Efate', 'SB-Pacific/Guadalcanal',
'FM-Pacific/Kosrae', 'NC-Pacific/Noumea', 'FM-Pacific/Ponape'],
28: ['AQ-Antarctica/DumontDUrville', 'AU-Australia/Brisbane',
'AU-Australia/Lindeman', 'GU-Pacific/Guam', 'PG-Pacific/Port_Moresby',
'MP-Pacific/Saipan', 'FM-Pacific/Truk'],
931091802: ['US-America/New_York', 'US-America/Detroit', 'CA-America/Iqaluit',
'US-America/Kentucky/Monticello', 'US-America/Louisville',
'CA-America/Montreal', 'BS-America/Nassau', 'CA-America/Nipigon',
'CA-America/Pangnirtung', 'CA-America/Thunder_Bay', 'CA-America/Toronto'],
30: ['JP-Asia/Tokyo', 'KR-Asia/Seoul', 'TL-Asia/Dili', 'ID-Asia/Jayapura',
'KP-Asia/Pyongyang', 'PW-Pacific/Palau'],
32: ['HK-Asia/Hong_Kong', 'CN-Asia/Shanghai', 'AU-Australia/Perth',
'TW-Asia/Taipei', 'SG-Asia/Singapore', 'AQ-Antarctica/Casey',
'BN-Asia/Brunei', 'CN-Asia/Chongqing', 'CN-Asia/Harbin',
'CN-Asia/Kashgar', 'MY-Asia/Kuala_Lumpur', 'MY-Asia/Kuching',
'MO-Asia/Macau', 'ID-Asia/Makassar', 'PH-Asia/Manila', 'CN-Asia/Urumqi'],
34: ['TH-Asia/Bangkok', 'AQ-Antarctica/Davis', 'ID-Asia/Jakarta',
'KH-Asia/Phnom_Penh', 'ID-Asia/Pontianak', 'VN-Asia/Saigon',
'LA-Asia/Vientiane', 'CX-Indian/Christmas'],
35: ['MM-Asia/Rangoon', 'CC-Indian/Cocos'],
941621262: ['BR-America/Sao_Paulo'],
37: ['IN-Asia/Calcutta'],
38: ['PK-Asia/Karachi', 'KZ-Asia/Aqtobe', 'TM-Asia/Ashgabat',
'TJ-Asia/Dushanbe', 'UZ-Asia/Samarkand', 'UZ-Asia/Tashkent',
'TF-Indian/Kerguelen', 'MV-Indian/Maldives'],
39: ['AF-Asia/Kabul'],
40: ['OM-Asia/Muscat', 'AE-Asia/Dubai', 'SC-Indian/Mahe',
'MU-Indian/Mauritius', 'RE-Indian/Reunion'],
626175324: ['JO-Asia/Amman'],
42: ['KE-Africa/Nairobi', 'SA-Asia/Riyadh', 'ET-Africa/Addis_Ababa',
'ER-Africa/Asmera', 'TZ-Africa/Dar_es_Salaam', 'DJ-Africa/Djibouti',
'UG-Africa/Kampala', 'SD-Africa/Khartoum', 'SO-Africa/Mogadishu',
'AQ-Antarctica/Syowa', 'YE-Asia/Aden', 'BH-Asia/Bahrain',
'KW-Asia/Kuwait', 'QA-Asia/Qatar', 'MG-Indian/Antananarivo',
'KM-Indian/Comoro', 'YT-Indian/Mayotte'],
44: ['ZA-Africa/Johannesburg', 'IL-Asia/Jerusalem', 'MW-Africa/Blantyre',
'BI-Africa/Bujumbura', 'BW-Africa/Gaborone', 'ZW-Africa/Harare',
'RW-Africa/Kigali', 'CD-Africa/Lubumbashi', 'ZM-Africa/Lusaka',
'MZ-Africa/Maputo', 'LS-Africa/Maseru', 'SZ-Africa/Mbabane',
'LY-Africa/Tripoli'],
46: ['NG-Africa/Lagos', 'DZ-Africa/Algiers', 'CF-Africa/Bangui',
'CG-Africa/Brazzaville', 'CM-Africa/Douala', 'CD-Africa/Kinshasa',
'GA-Africa/Libreville', 'AO-Africa/Luanda', 'GQ-Africa/Malabo',
'TD-Africa/Ndjamena', 'NE-Africa/Niamey', 'BJ-Africa/Porto-Novo'],
48: ['MA-Africa/Casablanca', 'CI-Africa/Abidjan', 'GH-Africa/Accra',
'ML-Africa/Bamako', 'GM-Africa/Banjul', 'GW-Africa/Bissau',
'GN-Africa/Conakry', 'SN-Africa/Dakar', 'EH-Africa/El_Aaiun',
'SL-Africa/Freetown', 'TG-Africa/Lome', 'LR-Africa/Monrovia',
'MR-Africa/Nouakchott', 'BF-Africa/Ouagadougou', 'ST-Africa/Sao_Tome',
'GL-America/Danmarkshavn', 'IS-Atlantic/Reykjavik',
'SH-Atlantic/St_Helena'],
570425352: ['GE-Asia/Tbilisi'],
50: ['CV-Atlantic/Cape_Verde'],
52: ['GS-Atlantic/South_Georgia', 'BR-America/Noronha'],
54: ['AR-America/Buenos_Aires', 'BR-America/Araguaina',
'AR-America/Argentina/La_Rioja', 'AR-America/Argentina/Rio_Gallegos',
'AR-America/Argentina/San_Juan', 'AR-America/Argentina/Tucuman',
'AR-America/Argentina/Ushuaia', 'BR-America/Bahia', 'BR-America/Belem',
'AR-America/Catamarca', 'GF-America/Cayenne', 'AR-America/Cordoba',
'BR-America/Fortaleza', 'AR-America/Jujuy', 'BR-America/Maceio',
'AR-America/Mendoza', 'SR-America/Paramaribo', 'BR-America/Recife',
'AQ-Antarctica/Rothera'],
56: ['VE-America/Caracas', 'AI-America/Anguilla', 'AG-America/Antigua',
'AW-America/Aruba', 'BB-America/Barbados', 'BR-America/Boa_Vista',
'AN-America/Curacao', 'DM-America/Dominica', 'GD-America/Grenada',
'GP-America/Guadeloupe', 'GY-America/Guyana', 'CU-America/Havana',
'BO-America/La_Paz', 'BR-America/Manaus', 'MQ-America/Martinique',
'MS-America/Montserrat', 'TT-America/Port_of_Spain',
'BR-America/Porto_Velho', 'PR-America/Puerto_Rico',
'DO-America/Santo_Domingo', 'KN-America/St_Kitts', 'LC-America/St_Lucia',
'VI-America/St_Thomas', 'VC-America/St_Vincent', 'VG-America/Tortola'],
58: ['US-America/Indianapolis', 'US-America/Indianapolis',
'CO-America/Bogota', 'KY-America/Cayman', 'CA-America/Coral_Harbour',
'BR-America/Eirunepe', 'EC-America/Guayaquil', 'US-America/Indiana/Knox',
'JM-America/Jamaica', 'PE-America/Lima', 'PA-America/Panama',
'BR-America/Rio_Branco'],
60: ['NI-America/Managua', 'CA-America/Regina', 'BZ-America/Belize',
'CR-America/Costa_Rica', 'SV-America/El_Salvador',
'CA-America/Swift_Current', 'EC-Pacific/Galapagos'],
62: ['US-America/Phoenix', 'CA-America/Dawson_Creek',
'MX-America/Hermosillo'],
64: ['PN-Pacific/Pitcairn'],
66: ['PF-Pacific/Gambier'],
67: ['PF-Pacific/Marquesas'],
68: ['US-Pacific/Honolulu', 'TK-Pacific/Fakaofo', 'UM-Pacific/Johnston',
'KI-Pacific/Kiritimati', 'CK-Pacific/Rarotonga', 'PF-Pacific/Tahiti'],
70: ['UM-Pacific/Midway', 'WS-Pacific/Apia', 'KI-Pacific/Enderbury',
'NU-Pacific/Niue', 'AS-Pacific/Pago_Pago'],
72: ['MH-Pacific/Kwajalein'],
49938444: ['MX-America/Chihuahua'],
905969678: ['CA-America/Halifax'],
626339164: ['EG-Africa/Cairo'],
939579406: ['FK-Atlantic/Stanley'],
487915538: ['AU-Australia/Lord_Howe'],
937427058: ['CL-Pacific/Easter'],
778043508: ['RU-Asia/Novosibirsk', 'RU-Asia/Omsk'],
474655352: ['RU-Asia/Anadyr', 'RU-Asia/Kamchatka'],
269133956: ['NZ-Pacific/Chatham'],
948087430: ['GL-America/Godthab'],
671787146: ['MN-Asia/Hovd'],
617261764: ['TR-Europe/Istanbul', 'RU-Europe/Kaliningrad', 'BY-Europe/Minsk'],
830603252: ['MX-America/Mexico_City', 'US-America/Chicago',
'MX-America/Cancun', 'US-America/Menominee', 'MX-America/Merida',
'MX-America/Monterrey', 'US-America/North_Dakota/Center',
'CA-America/Rainy_River', 'CA-America/Rankin_Inlet'],
805300897: ['LK-Asia/Colombo'],
805312524: ['MX-America/Mexico_City', 'HN-America/Tegucigalpa'],
984437412: ['GS-Atlantic/South_Georgia'],
850043558: ['MX-America/Chihuahua'],
29: ['AU-Australia/Darwin'],
710950176: ['MN-Asia/Ulaanbaatar'],
617786052: ['RO-Europe/Bucharest', 'FI-Europe/Helsinki', 'CY-Asia/Nicosia',
'GR-Europe/Athens', 'MD-Europe/Chisinau', 'TR-Europe/Istanbul',
'UA-Europe/Kiev', 'LV-Europe/Riga', 'UA-Europe/Simferopol',
'BG-Europe/Sofia', 'EE-Europe/Tallinn', 'UA-Europe/Uzhgorod',
'LT-Europe/Vilnius', 'UA-Europe/Zaporozhye'],
105862464: ['US-America/Juneau'],
581567010: ['IQ-Asia/Baghdad'],
1294772902: ['US-America/Los_Angeles', 'CA-America/Dawson',
'MX-America/Tijuana', 'CA-America/Vancouver', 'CA-America/Whitehorse'],
483044050: ['AU-Australia/Sydney', 'AU-Australia/Melbourne'],
491433170: ['AU-Australia/Hobart'],
36: ['NP-Asia/Katmandu', 'LK-Asia/Colombo', 'BD-Asia/Dhaka',
'AQ-Antarctica/Mawson', 'AQ-Antarctica/Vostok', 'KZ-Asia/Almaty',
'KZ-Asia/Qyzylorda', 'BT-Asia/Thimphu', 'IO-Indian/Chagos'],
626175196: ['IL-Asia/Jerusalem'],
919994592: ['CA-America/Goose_Bay'],
946339336: ['GB-Europe/London', 'ES-Atlantic/Canary', 'FO-Atlantic/Faeroe',
'PT-Atlantic/Madeira', 'IE-Europe/Dublin', 'PT-Europe/Lisbon'],
1037565906: ['PT-Atlantic/Azores', 'GL-America/Scoresbysund'],
670913918: ['TN-Africa/Tunis'],
41: ['IR-Asia/Tehran'],
572522538: ['RU-Europe/Moscow'],
403351686: ['MN-Asia/Choibalsan'],
626338524: ['PS-Asia/Gaza'],
411740806: ['RU-Asia/Yakutsk'],
635437856: ['RU-Asia/Irkutsk'],
617261788: ['RO-Europe/Bucharest', 'LB-Asia/Beirut'],
947956358: ['GL-America/Godthab', 'PM-America/Miquelon'],
12: ['EC-Pacific/Galapagos'],
626306268: ['SY-Asia/Damascus'],
497024903: ['AU-Australia/Adelaide', 'AU-Australia/Broken_Hill'],
456480044: ['RU-Asia/Vladivostok', 'RU-Asia/Sakhalin'],
312471854: ['NZ-Pacific/Auckland', 'AQ-Antarctica/McMurdo'],
626347356: ['EG-Africa/Cairo'],
897537370: ['CU-America/Havana'],
680176266: ['RU-Asia/Krasnoyarsk'],
1465210176: ['US-America/Anchorage'],
805312908: ['NI-America/Managua'],
492088530: ['AU-Australia/Currie', 'AU-Australia/Hobart'],
901076366: ['BR-America/Campo_Grande', 'BR-America/Cuiaba'],
943019406: ['CL-America/Santiago', 'AQ-Antarctica/Palmer'],
928339288: ['US-America/New_York', 'CA-America/Montreal',
'CA-America/Toronto', 'US-America/Detroit'],
939480410: ['US-America/Indiana/Marengo', 'US-America/Indiana/Vevay'],
626392412: ['NA-Africa/Windhoek'],
559943005: ['IR-Asia/Tehran'],
592794974: ['KZ-Asia/Aqtau', 'KZ-Asia/Oral'],
76502378: ['CA-America/Pangnirtung'],
838860812: ['US-America/Denver', 'CA-America/Edmonton'],
931091834: ['TC-America/Grand_Turk', 'HT-America/Port-au-Prince'],
662525310: ['FR-Europe/Paris', 'DE-Europe/Berlin', 'BA-Europe/Sarajevo',
'CS-Europe/Belgrade', 'ES-Africa/Ceuta', 'NL-Europe/Amsterdam',
'AD-Europe/Andorra', 'SK-Europe/Bratislava', 'BE-Europe/Brussels',
'HU-Europe/Budapest', 'DK-Europe/Copenhagen', 'GI-Europe/Gibraltar',
'SI-Europe/Ljubljana', 'LU-Europe/Luxembourg', 'ES-Europe/Madrid',
'MT-Europe/Malta', 'MC-Europe/Monaco', 'NO-Europe/Oslo',
'CZ-Europe/Prague', 'IT-Europe/Rome', 'MK-Europe/Skopje',
'SE-Europe/Stockholm', 'AL-Europe/Tirane', 'LI-Europe/Vaduz',
'AT-Europe/Vienna', 'PL-Europe/Warsaw', 'HR-Europe/Zagreb',
'CH-Europe/Zurich'],
1465865536: ['US-America/Anchorage', 'US-America/Juneau',
'US-America/Nome', 'US-America/Yakutat'],
495058823: ['AU-Australia/Adelaide', 'AU-Australia/Broken_Hill'],
599086472: ['GE-Asia/Tbilisi', 'AM-Asia/Yerevan', 'RU-Europe/Samara'],
805337484: ['GT-America/Guatemala'],
1001739662: ['PY-America/Asuncion'],
836894706: ['CA-America/Winnipeg'],
599086512: ['AZ-Asia/Baku'],
836894708: ['CA-America/Winnipeg'],
41025476: ['US-America/Menominee'],
501219282: ['RU-Asia/Magadan'],
970325971: ['CA-America/St_Johns'],
769654750: ['RU-Asia/Yekaterinburg'],
1286253222: ['US-America/Los_Angeles', 'CA-America/Vancouver',
'CA-America/Whitehorse'],
1373765610: ['US-America/Adak'],
973078513: ['CA-America/St_Johns'],
838860786: ['US-America/Chicago', 'CA-America/Winnipeg'],
970326003: ['CA-America/St_Johns'],
771751924: ['KG-Asia/Bishkek'],
952805774: ['AQ-Antarctica/Palmer'],
483699410: ['AU-Australia/Sydney', 'AU-Australia/Melbourne']
};

View File

@@ -0,0 +1,131 @@
// Copyright 2007 The Closure Library Authors. All Rights Reserved.
//
// 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.
/**
* @fileoverview Functions for listing timezone names.
* @suppress {deprecated} Use goog.i18n instead.
*/
/** @suppress {extraProvide} */
goog.provide('goog.locale.TimeZoneList');
goog.require('goog.locale');
/**
* Returns the displayable list of short timezone names paired with its id for
* the current locale, selected based on the region or language provided.
*
* This method depends on goog.locale.TimeZone*__<locale> available
* from http://go/js_locale_data. User of this method
* has to add dependacy to this.
*
* @param {string=} opt_regionOrLang If region tag is provided, timezone ids
* specific this region are considered. If language is provided, all regions
* for which this language is defacto official is considered. If
* this parameter is not speficied, current locale is used to
* extract this information.
*
* @return {Array.<Object>} Localized and relevant list of timezone names
* and ids.
*/
goog.locale.getTimeZoneSelectedShortNames = function(opt_regionOrLang) {
return goog.locale.getTimeZoneNameList_('TimeZoneSelectedShortNames',
opt_regionOrLang);
};
/**
* Returns the displayable list of long timezone names paired with its id for
* the current locale, selected based on the region or language provided.
*
* This method depends on goog.locale.TimeZone*__<locale> available
* from http://go/js_locale_data. User of this method
* has to add dependacy to this.
*
* @param {string=} opt_regionOrLang If region tag is provided, timezone ids
* specific this region are considered. If language is provided, all regions
* for which this language is defacto official is considered. If
* this parameter is not speficied, current locale is used to
* extract this information.
*
* @return {Array.<Object>} Localized and relevant list of timezone names
* and ids.
*/
goog.locale.getTimeZoneSelectedLongNames = function(opt_regionOrLang) {
return goog.locale.getTimeZoneNameList_('TimeZoneSelectedLongNames',
opt_regionOrLang);
};
/**
* Returns the displayable list of long timezone names paired with its id for
* the current locale.
*
* This method depends on goog.locale.TimeZoneAllLongNames__<locale> available
* from http://go/js_locale_data. User of this method
* has to add dependacy to this.
*
* @return {Array.<Object>} localized and relevant list of timezone names
* and ids.
*/
goog.locale.getTimeZoneAllLongNames = function() {
var locale = goog.locale.getLocale();
return /** @type {Array} */ (
goog.locale.getResource('TimeZoneAllLongNames', locale));
};
/**
* Returns the displayable list of timezone names paired with its id for
* the current locale, selected based on the region or language provided.
*
* This method depends on goog.locale.TimeZone*__<locale> available
* from http://go/js_locale_data. User of this method
* has to add dependacy to this.
*
* @param {string} nameType Resource name to be loaded to get the names.
*
* @param {string=} opt_resource If resource is region tag, timezone ids
* specific this region are considered. If it is language, all regions
* for which this language is defacto official is considered. If it is
* undefined, current locale is used to extract this information.
*
* @return {Array.<Object>} Localized and relevant list of timezone names
* and ids.
* @private
*/
goog.locale.getTimeZoneNameList_ = function(nameType, opt_resource) {
var locale = goog.locale.getLocale();
if (!opt_resource) {
opt_resource = goog.locale.getRegionSubTag(locale);
}
// if there is no region subtag, use the language itself as the resource
if (!opt_resource) {
opt_resource = locale;
}
var names = goog.locale.getResource(nameType, locale);
var ids = goog.locale.getResource('TimeZoneSelectedIds', opt_resource);
var len = ids.length;
var result = [];
for (var i = 0; i < len; i++) {
var id = ids[i];
result.push({'id': id, 'name': names[id]});
}
return result;
};