Skip to content

Commit

Permalink
Add new languages to resources (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda authored Mar 9, 2024
1 parent f6f1993 commit 5e6c1c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import id from '@/i18n/locale/id.json';
import it from '@/i18n/locale/it.json';
import ja from '@/i18n/locale/ja.json';
import ko from '@/i18n/locale/ko.json';
import nb_NO from '@/i18n/locale/nb-NO.json';
import pt from '@/i18n/locale/pt.json';
import sv from '@/i18n/locale/sv.json';
import uk from '@/i18n/locale/uk.json';
import vi from '@/i18n/locale/vi.json';
import zh_Hans from '@/i18n/locale/zh_Hans.json';
Expand All @@ -32,14 +34,16 @@ const translationHelper = <T>(lng: T) => ({
export const resources = {
ar: translationHelper(ar),
de: translationHelper(de),
es: translationHelper(es),
en: translationHelper(en), // default language
es: translationHelper(es),
fr: translationHelper(fr),
id: translationHelper(id),
it: translationHelper(it),
ja: translationHelper(ja),
ko: translationHelper(ko),
nb: translationHelper(nb_NO),
pt: translationHelper(pt),
sv: translationHelper(sv),
uk: translationHelper(uk),
vi: translationHelper(vi),
'zh-Hans': translationHelper(zh_Hans),
Expand Down
6 changes: 6 additions & 0 deletions src/util/language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ export const ISOLanguages = [
{ dayjsImport: () => import('dayjs/locale/bg.js'), code: 'bg', name: 'Bulgarian', nativeName: 'български' },
{ dayjsImport: () => import('dayjs/locale/cs.js'), code: 'cs', name: 'Czech', nativeName: 'čeština' },
{ dayjsImport: () => import('dayjs/locale/pl.js'), code: 'pl', name: 'Polish', nativeName: 'polski' },
{
dayjsImport: () => import('dayjs/locale/nb.js'),
code: 'nb',
name: 'Norwegian Bokmål',
nativeName: 'Norsk bokmål',
},
{ dayjsImport: () => import('dayjs/locale/nb.js'), code: 'no', name: 'Norwegian', nativeName: 'Norsk' },
{ dayjsImport: () => import('dayjs/locale/nl.js'), code: 'nl', name: 'Dutch', nativeName: 'Nederlands' },
{ dayjsImport: () => import('dayjs/locale/my.js'), code: 'my', name: 'Burmese', nativeName: 'ဗမာစာ' },
Expand Down

0 comments on commit 5e6c1c1

Please sign in to comment.