yandere_fe/src/i18n/languages.js

53 lines
636 B
JavaScript
Raw Normal View History

2022-09-20 16:27:26 -07:00
const languages = [
'ar',
'ca',
'cs',
'de',
'eo',
'en',
'es',
'et',
'eu',
'fi',
'fr',
'ga',
'he',
'hu',
'it',
'ja',
'ja_easy',
'ko',
'nb',
'nl',
'oc',
'pl',
'pt',
'ro',
'ru',
'sk',
'te',
'uk',
'zh',
'zh_Hant'
]
const specialJsonName = {
ja: 'ja_pedantic'
}
const langCodeToJsonName = (code) => specialJsonName[code] || code
2022-09-20 17:15:32 -07:00
const langCodeToCldrName = (code) => code
const ensureFinalFallback = codes => {
return codes.includes('en') ? codes : codes.concat(['en'])
}
2022-09-20 16:27:26 -07:00
module.exports = {
languages,
2022-09-20 17:15:32 -07:00
langCodeToJsonName,
langCodeToCldrName,
ensureFinalFallback
2022-09-20 16:27:26 -07:00
}