mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
[INTL] Switch to browsers locale based on headers Resolves #175
This commit is contained in:
parent
d259a2db51
commit
40d60c4bcc
2 changed files with 53 additions and 0 deletions
|
@ -9,6 +9,18 @@ var getDefaultLocale = exports.getDefaultLocale = function() {
|
|||
return 'en_US';
|
||||
};
|
||||
|
||||
// resolve the messy mapping between browser language
|
||||
// and our supported locales
|
||||
var langLocaleMap = exports.langLocaleMap = {
|
||||
en: 'en_US',
|
||||
zh: 'zh_CN',
|
||||
ja: 'ja',
|
||||
ko: 'ko',
|
||||
es: 'es_AR',
|
||||
fr: 'fr_FR',
|
||||
de: 'de_DE',
|
||||
};
|
||||
|
||||
var fallbackMap = {
|
||||
'zh_TW': 'zh_CN'
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue