Further work on localization
This commit is contained in:
parent
fa451fc8da
commit
cb1fc5b28d
35 changed files with 430 additions and 2796 deletions
|
@ -41,27 +41,26 @@ function convertToFake(dict) {
|
|||
|
||||
// The langugage labels below are intentionally not localized so that they are always native in the langugae of their speaker (regardless of the currently selected language)
|
||||
const langCodes = {
|
||||
en_US: {
|
||||
'en-US': {
|
||||
getShortLabel: t => 'EN',
|
||||
getLabel: t => 'English',
|
||||
shortCode: 'en',
|
||||
longCode: 'en_US'
|
||||
longCode: 'en-US'
|
||||
},
|
||||
es: {
|
||||
'es-ES': {
|
||||
getShortLabel: t => 'ES',
|
||||
getLabel: t => 'Español',
|
||||
shortCode: 'es',
|
||||
longCode: 'es'
|
||||
longCode: 'es-ES'
|
||||
},
|
||||
fake: {
|
||||
getShortLabel: t => 'FAKE',
|
||||
'fk-FK': {
|
||||
getShortLabel: t => 'FK',
|
||||
getLabel: t => 'Fake',
|
||||
shortCode: 'fake',
|
||||
longCode: 'fake'
|
||||
longCode: 'fk-FK'
|
||||
}
|
||||
}
|
||||
|
||||
langCodes.en = langCodes['en-US'] = langCodes.en_US;
|
||||
function getLang(lng) {
|
||||
return langCodes[lng];
|
||||
}
|
||||
|
||||
module.exports.convertToFake = convertToFake;
|
||||
module.exports.langCodes = langCodes;
|
||||
module.exports.getLang = getLang;
|
Loading…
Add table
Add a link
Reference in a new issue