2017-09-21 11:54:41 -04:00
|
|
|
|
/**
|
|
|
|
|
* Currently supported locales for the Scratch Project
|
|
|
|
|
* @type {Object} Key Value pairs of locale code: Language name written in the language
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const locales = {
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'ab': {name: 'Аҧсшәа'},
|
2018-10-10 17:47:46 -04:00
|
|
|
|
'ar': {name: 'العربية'},
|
2018-09-18 16:58:25 -04:00
|
|
|
|
'am': {name: 'አማርኛ'},
|
2018-07-19 09:31:11 -04:00
|
|
|
|
'az': {name: 'Azeri'},
|
2018-06-19 16:57:48 -04:00
|
|
|
|
'id': {name: 'Bahasa Indonesia'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'ca': {name: 'Català'},
|
|
|
|
|
'cs': {name: 'Česky'},
|
|
|
|
|
'cy': {name: 'Cymraeg'},
|
2018-06-19 16:57:48 -04:00
|
|
|
|
'da': {name: 'Dansk'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'de': {name: 'Deutsch'},
|
2018-07-12 13:43:00 -04:00
|
|
|
|
'et': {name: 'Eesti'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'el': {name: 'Ελληνικά'},
|
|
|
|
|
'en': {name: 'English'},
|
|
|
|
|
'es': {name: 'Español'},
|
|
|
|
|
'es-419': {name: 'Español Latinoamericano'},
|
2018-09-18 16:58:25 -04:00
|
|
|
|
'eu': {name: 'Euskara'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'fr': {name: 'Français'},
|
|
|
|
|
'ga': {name: 'Gaeilge'},
|
|
|
|
|
'gd': {name: 'Gàidhlig'},
|
2018-06-19 16:57:48 -04:00
|
|
|
|
'gl': {name: 'Galego'},
|
2018-07-12 13:43:00 -04:00
|
|
|
|
'ko': {name: '한국어'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'he': {name: 'עִבְרִית'},
|
2018-11-15 08:36:52 -05:00
|
|
|
|
'hr': {name: 'Hrvatski'},
|
2018-12-13 09:07:56 -05:00
|
|
|
|
'zu': {name: 'isiZulu'},
|
2018-08-10 09:25:02 -04:00
|
|
|
|
'is': {name: 'Íslenska'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'it': {name: 'Italiano'},
|
2018-12-20 11:40:44 -05:00
|
|
|
|
// 'lv': {name: 'Latviešu'},
|
2018-08-17 09:49:52 -04:00
|
|
|
|
'lt': {name: 'Lietuvių'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'mi': {name: 'Maori'},
|
|
|
|
|
'nl': {name: 'Nederlands'},
|
2018-07-12 13:43:00 -04:00
|
|
|
|
'ja': {name: '日本語'},
|
|
|
|
|
'ja-Hira': {name: 'にほんご'},
|
2018-07-19 09:31:11 -04:00
|
|
|
|
'hu': {name: 'Magyar'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'nb': {name: 'Norsk Bokmål'},
|
2018-12-20 11:40:44 -05:00
|
|
|
|
// 'nn': {name: 'Norsk Nynorsk'},
|
2018-06-19 16:57:48 -04:00
|
|
|
|
'th': {name: 'ไทย'},
|
2018-07-19 09:31:11 -04:00
|
|
|
|
'pl': {name: 'Polski'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'pt': {name: 'Português'},
|
|
|
|
|
'pt-br': {name: 'Português Brasileiro'},
|
2018-10-10 17:47:46 -04:00
|
|
|
|
'ro': {name: 'Română'},
|
2018-07-19 09:31:11 -04:00
|
|
|
|
'ru': {name: 'Русский'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'sr': {name: 'Српски'},
|
2018-12-20 11:40:44 -05:00
|
|
|
|
// 'sk': {name: 'Slovenčina'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'sl': {name: 'Slovenščina'},
|
2018-06-19 16:57:48 -04:00
|
|
|
|
'fi': {name: 'Suomi'},
|
|
|
|
|
'sv': {name: 'Svenska'},
|
|
|
|
|
'vi': {name: 'Tiếng Việt'},
|
2018-05-21 09:42:53 -04:00
|
|
|
|
'tr': {name: 'Türkçe'},
|
|
|
|
|
'uk': {name: 'Українська'},
|
|
|
|
|
'zh-cn': {name: '简体中文'},
|
|
|
|
|
'zh-tw': {name: '繁體中文'}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const customLocales = {
|
|
|
|
|
'ab': {
|
|
|
|
|
locale: 'ab',
|
|
|
|
|
parentLocale: 'az'
|
|
|
|
|
},
|
|
|
|
|
'es-419': {
|
|
|
|
|
locale: 'es-419',
|
|
|
|
|
parentLocale: 'es'
|
|
|
|
|
},
|
|
|
|
|
'mi': {
|
|
|
|
|
locale: 'mi',
|
|
|
|
|
parentLocale: 'en'
|
|
|
|
|
},
|
|
|
|
|
'zh-cn': {
|
|
|
|
|
locale: 'zh-cn',
|
|
|
|
|
parentLocale: 'zh'
|
|
|
|
|
},
|
|
|
|
|
'zh-tw': {
|
|
|
|
|
locale: 'zh-tw',
|
|
|
|
|
parentLocale: 'zh'
|
|
|
|
|
}
|
2017-09-21 11:54:41 -04:00
|
|
|
|
};
|
|
|
|
|
|
2018-11-25 18:05:44 -05:00
|
|
|
|
const localeMap = {
|
|
|
|
|
'aa-dj': 'aa_DJ',
|
|
|
|
|
'es-419': 'es_419',
|
|
|
|
|
// ja-Hira: no map - it's 'ja-Hira' on transifex
|
|
|
|
|
'pt-br': 'pt_BR',
|
|
|
|
|
'zh-cn': 'zh_CN',
|
|
|
|
|
'zh-tw': 'zh_TW'
|
|
|
|
|
};
|
|
|
|
|
|
2018-08-17 09:34:12 -04:00
|
|
|
|
// list of RTL locales supported, and a function to check whether a locale is RTL
|
|
|
|
|
const rtlLocales = [
|
2018-10-10 17:47:46 -04:00
|
|
|
|
'ar',
|
2018-08-17 09:34:12 -04:00
|
|
|
|
'he'
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const isRtl = locale => {
|
|
|
|
|
return rtlLocales.indexOf(locale) !== -1;
|
|
|
|
|
};
|
|
|
|
|
|
2018-03-13 11:46:37 -04:00
|
|
|
|
const wwwLocales = {
|
|
|
|
|
'ab': {name: 'Аҧсшәа'},
|
|
|
|
|
'ar': {name: 'العربية'},
|
|
|
|
|
'an': {name: 'Aragonés'},
|
|
|
|
|
'ast': {name: 'Asturianu'},
|
|
|
|
|
'id': {name: 'Bahasa Indonesia'},
|
|
|
|
|
'ms': {name: 'Bahasa Melayu'},
|
|
|
|
|
'be': {name: 'Беларуская'},
|
|
|
|
|
'bg': {name: 'Български'},
|
|
|
|
|
'ca': {name: 'Català'},
|
|
|
|
|
'cs': {name: 'Česky'},
|
|
|
|
|
'cy': {name: 'Cymraeg'},
|
|
|
|
|
'da': {name: 'Dansk'},
|
|
|
|
|
'de': {name: 'Deutsch'},
|
|
|
|
|
'yum': {name: 'Edible Scratch'},
|
|
|
|
|
'et': {name: 'Eesti'},
|
|
|
|
|
'el': {name: 'Ελληνικά'},
|
|
|
|
|
'en': {name: 'English'},
|
|
|
|
|
'eo': {name: 'Esperanto'},
|
|
|
|
|
'es': {name: 'Español'},
|
|
|
|
|
'eu': {name: 'Euskara'},
|
|
|
|
|
'fa': {name: 'فارسی'},
|
|
|
|
|
'fr': {name: 'Français'},
|
|
|
|
|
'fur': {name: 'Furlan'},
|
|
|
|
|
'ga': {name: 'Gaeilge'},
|
|
|
|
|
'gd': {name: 'Gàidhlig'},
|
|
|
|
|
'gl': {name: 'Galego'},
|
|
|
|
|
'ko': {name: '한국어'},
|
|
|
|
|
'hy': {name: 'Հայերեն'},
|
|
|
|
|
'he': {name: 'עִבְרִית'},
|
|
|
|
|
'hi': {name: 'हिन्दी'},
|
|
|
|
|
'hr': {name: 'Hrvatski'},
|
|
|
|
|
'zu': {name: 'isiZulu'},
|
|
|
|
|
'is': {name: 'Íslenska'},
|
|
|
|
|
'it': {name: 'Italiano'},
|
|
|
|
|
'kn': {name: 'ಭಾಷೆ-ಹೆಸರು'},
|
|
|
|
|
'rw': {name: 'Kinyarwanda'},
|
|
|
|
|
'ht': {name: 'Kreyòl'},
|
|
|
|
|
'ku': {name: 'Kurdî'},
|
|
|
|
|
'la': {name: 'Latina'},
|
|
|
|
|
'lv': {name: 'Latviešu'},
|
|
|
|
|
'lt': {name: 'Lietuvių'},
|
|
|
|
|
'mk': {name: 'Македонски'},
|
|
|
|
|
'hu': {name: 'Magyar'},
|
|
|
|
|
'ml': {name: 'മലയാളം'},
|
|
|
|
|
'mt': {name: 'Malti'},
|
|
|
|
|
'cat': {name: 'Meow'},
|
|
|
|
|
'mr': {name: 'मराठी'},
|
|
|
|
|
'mn': {name: 'Монгол хэл'},
|
|
|
|
|
'my': {name: 'မြန်မာဘာသာ'},
|
|
|
|
|
'nl': {name: 'Nederlands'},
|
|
|
|
|
'ja': {name: '日本語'},
|
|
|
|
|
'nb': {name: 'Norsk Bokmål'},
|
|
|
|
|
'nn': {name: 'Norsk Nynorsk'},
|
|
|
|
|
'uz': {name: 'Oʻzbekcha'},
|
|
|
|
|
'th': {name: 'ไทย'},
|
|
|
|
|
'pl': {name: 'Polski'},
|
|
|
|
|
'pt': {name: 'Português'},
|
|
|
|
|
'pt-br': {name: 'Português Brasileiro'},
|
|
|
|
|
'ro': {name: 'Română'},
|
|
|
|
|
'ru': {name: 'Русский'},
|
|
|
|
|
'sc': {name: 'Sardu'},
|
|
|
|
|
'sq': {name: 'Shqip'},
|
|
|
|
|
'sk': {name: 'Slovenčina'},
|
|
|
|
|
'sl': {name: 'Slovenščina'},
|
|
|
|
|
'sr': {name: 'Српски'},
|
|
|
|
|
'fi': {name: 'Suomi'},
|
|
|
|
|
'sv': {name: 'Svenska'},
|
|
|
|
|
'te': {name: 'తెలుగు'},
|
|
|
|
|
'vi': {name: 'Tiếng Việt'},
|
|
|
|
|
'tr': {name: 'Türkçe'},
|
|
|
|
|
'uk': {name: 'Українська'},
|
|
|
|
|
'zh-cn': {name: '简体中文'},
|
|
|
|
|
'zh-tw': {name: '繁體中文'}
|
|
|
|
|
};
|
|
|
|
|
|
2018-11-25 18:05:44 -05:00
|
|
|
|
export {locales as default, customLocales, localeMap, rtlLocales, isRtl, wwwLocales};
|