Further work on localization

This commit is contained in:
Tomas Bures 2018-12-15 15:15:48 +01:00
parent fa451fc8da
commit cb1fc5b28d
35 changed files with 430 additions and 2796 deletions

View file

@ -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;