Add Khmer Localization (#6914)

* add khmer language

* update translate

* update translate

* add missing localization key

* update khmer wording

* update khmer wording

* add missing translate

* add missing translate

* chore: add khmer local date-time format

* Update src/locale/i18n.ts

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
This commit is contained in:
roth
2024-12-19 06:33:19 +07:00
committed by GitHub
parent 9b35521d3c
commit 323c974c6b
8 changed files with 8639 additions and 0 deletions
+1
View File
@@ -87,6 +87,7 @@ module.exports = function (config) {
'id',
'it',
'ja',
'km',
'ko',
'nl',
'pl',
+1
View File
@@ -17,6 +17,7 @@ module.exports = {
'id',
'it',
'ja',
'km',
'ko',
'nl',
'pl',
+2
View File
@@ -22,6 +22,7 @@ import {
id,
it,
ja,
km,
ko,
nl,
pl,
@@ -60,6 +61,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
id,
it,
ja,
km,
ko,
nl,
pl,
+2
View File
@@ -149,6 +149,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.it
case 'ja':
return AppLanguage.ja
case 'km':
return AppLanguage.km
case 'ko':
return AppLanguage.ko
case 'nl':
+11
View File
@@ -29,6 +29,7 @@ import {messages as messagesHu} from '#/locale/locales/hu/messages'
import {messages as messagesId} from '#/locale/locales/id/messages'
import {messages as messagesIt} from '#/locale/locales/it/messages'
import {messages as messagesJa} from '#/locale/locales/ja/messages'
import {messages as messagesKm} from '#/locale/locales/km/messages'
import {messages as messagesKo} from '#/locale/locales/ko/messages'
import {messages as messagesNl} from '#/locale/locales/nl/messages'
import {messages as messagesPl} from '#/locale/locales/pl/messages'
@@ -184,6 +185,16 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.km: {
i18n.loadAndActivate({locale, messages: messagesKm})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/km'),
import('@formatjs/intl-datetimeformat/locale-data/km'),
import('@formatjs/intl-pluralrules/locale-data/km'),
import('@formatjs/intl-numberformat/locale-data/km'),
])
break
}
case AppLanguage.ko: {
i18n.loadAndActivate({locale, messages: messagesKo})
await Promise.all([
+4
View File
@@ -72,6 +72,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/ja/messages`)
break
}
case AppLanguage.km: {
mod = await import(`./locales/km/messages`)
break
}
case AppLanguage.ko: {
mod = await import(`./locales/ko/messages`)
break
+2
View File
@@ -21,6 +21,7 @@ export enum AppLanguage {
id = 'id',
it = 'it',
ja = 'ja',
km = 'km',
ko = 'ko',
nl = 'nl',
pl = 'pl',
@@ -58,6 +59,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.id, name: 'Bahasa Indonesia Indonesian'},
{code2: AppLanguage.it, name: 'Italiano Italian'},
{code2: AppLanguage.ja, name: '日本語 Japanese'},
{code2: AppLanguage.km, name: 'ភាសាខ្មែរ Khmer'},
{code2: AppLanguage.ko, name: '한국어 Korean'},
{code2: AppLanguage.nl, name: 'Nederlands Dutch'},
{code2: AppLanguage.pl, name: 'Polski Polish'},
File diff suppressed because it is too large Load Diff