Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type BaseLocale = 'en'
export type Locales =
| 'en'
| 'fr'
| 'ko'

export type Translation = RootTranslation

Expand Down
1 change: 1 addition & 0 deletions src/i18n/i18n-util.async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { loadedFormatters, loadedLocales, locales } from './i18n-util'
const localeTranslationLoaders = {
en: () => import('./en'),
fr: () => import('./fr'),
ko: () => import('./ko'),
}

const updateDictionary = (locale: Locales, dictionary: Partial<Translations>): Translations =>
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/i18n-util.sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { loadedFormatters, loadedLocales, locales } from './i18n-util'

import en from './en'
import fr from './fr'
import ko from './ko'

const localeTranslations = {
en,
fr,
ko,
}

export const loadLocale = (locale: Locales): void => {
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/i18n-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const baseLocale: Locales = 'en'

export const locales: Locales[] = [
'en',
'fr'
'fr',
'ko'
]

export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales)
Expand Down
Loading
Loading