i18n(ko): separate South and North Korean options, one flag each
This commit is contained in:
parent
4e8999b84c
commit
1dd23c1549
4 changed files with 8 additions and 4 deletions
|
|
@ -26,7 +26,8 @@ const languages: LanguageOption[] = [
|
|||
{ code: 'nl', name: 'Dutch', nativeName: 'Nederlands', flag: '🇳🇱' },
|
||||
{ code: 'pl', name: 'Polish', nativeName: 'Polski', flag: '🇵🇱' },
|
||||
{ code: 'ru', name: 'Russian', nativeName: 'Русский', flag: '🇷🇺' },
|
||||
{ code: 'ko', name: 'Korean', nativeName: '한국어', flag: '🇰🇵🇰🇷' },
|
||||
{ code: 'ko', name: 'Korean', nativeName: '한국어', flag: '🇰🇷' },
|
||||
{ code: 'ko-KP', name: 'Korean (North)', nativeName: '조선어', flag: '🇰🇵' },
|
||||
{ code: 'th', name: 'Thai', nativeName: 'ไทย', flag: '🇹🇭' },
|
||||
{ code: 'ja', name: 'Japanese', nativeName: '日本語', flag: '🇯🇵' },
|
||||
];
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import en from '@/i18n/en';
|
|||
* `react-refresh/only-export-components` rule.
|
||||
*/
|
||||
|
||||
export type Language = 'en' | 'es' | 'th' | 'ja' | 'pt' | 'fr' | 'de' | 'it' | 'nl' | 'pl' | 'ru' | 'ko';
|
||||
export type Language = 'en' | 'es' | 'th' | 'ja' | 'pt' | 'fr' | 'de' | 'it' | 'nl' | 'pl' | 'ru' | 'ko' | 'ko-KP';
|
||||
|
||||
type TranslationKey = string;
|
||||
type TranslationValue = string | { [key: string]: TranslationValue };
|
||||
|
|
@ -49,6 +49,8 @@ export const LANGUAGE_LOADERS: Record<Language, () => Promise<Translations>> = {
|
|||
pl: () => import('@/i18n/pl').then((m) => m.default),
|
||||
ru: () => import('@/i18n/ru').then((m) => m.default),
|
||||
ko: () => import('@/i18n/ko').then((m) => m.default),
|
||||
// North Korean option reuses the same Korean dictionary (mutually intelligible).
|
||||
'ko-KP': () => import('@/i18n/ko').then((m) => m.default),
|
||||
};
|
||||
|
||||
/** Get a nested value from an object using dot notation (`nav.home`). */
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export function setDateLocale(language: Language): void {
|
|||
} else if (language === 'ru') {
|
||||
activeLocale = ruLocale;
|
||||
activeCode = 'ru-RU';
|
||||
} else if (language === 'ko') {
|
||||
} else if (language === 'ko' || language === 'ko-KP') {
|
||||
activeLocale = koLocale;
|
||||
activeCode = 'ko-KR';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ const ALL_LANGUAGES = [
|
|||
{ code: 'eu', label: 'Basque', flag: '🏴' },
|
||||
{ code: 'gl', label: 'Galician', flag: '🏴' },
|
||||
// Asian
|
||||
{ code: 'ko', label: 'Korean', flag: '🇰🇵🇰🇷' },
|
||||
{ code: 'ko', label: 'Korean', flag: '🇰🇷' },
|
||||
{ code: 'ko-KP', label: 'Korean (North)', flag: '🇰🇵' },
|
||||
{ code: 'vi', label: 'Vietnamese', flag: '🇻🇳' },
|
||||
{ code: 'th', label: 'Thai', flag: '🇹🇭' },
|
||||
{ code: 'id', label: 'Indonesian', flag: '🇮🇩' },
|
||||
|
|
|
|||
Loading…
Reference in a new issue