mirror of
https://example.com
synced 2024-11-23 13:06:39 +09:00
Don't hardcode locales
This commit is contained in:
parent
95ce4151e4
commit
31af36e57e
1 changed files with 8 additions and 27 deletions
|
@ -13,33 +13,14 @@ const merge = (...args) => args.reduce((a, c) => ({
|
|||
.reduce((a, [k, v]) => (a[k] = merge(v, c[k]), a), {})
|
||||
}), {});
|
||||
|
||||
const languages = [
|
||||
'ar-SA',
|
||||
'cs-CZ',
|
||||
'da-DK',
|
||||
'de-DE',
|
||||
'en-US',
|
||||
'es-ES',
|
||||
'fr-FR',
|
||||
'id-ID',
|
||||
'it-IT',
|
||||
'ja-JP',
|
||||
'ja-KS',
|
||||
'kab-KAB',
|
||||
'kn-IN',
|
||||
'ko-KR',
|
||||
'nl-NL',
|
||||
'no-NO',
|
||||
'pl-PL',
|
||||
'pt-PT',
|
||||
'ru-RU',
|
||||
'sk-SK',
|
||||
'ug-CN',
|
||||
'uk-UA',
|
||||
'vi-VN',
|
||||
'zh-CN',
|
||||
'zh-TW',
|
||||
];
|
||||
languages = []
|
||||
|
||||
fs.readdirSync(__dirname).forEach((file) => {
|
||||
if (file.includes('.yml')){
|
||||
file = file.slice(0, file.indexOf('.'))
|
||||
languages.push(file)
|
||||
}
|
||||
})
|
||||
|
||||
const primaries = {
|
||||
'en': 'US',
|
||||
|
|
Loading…
Reference in a new issue