Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(i18n): support danish language #2154

Merged
merged 1 commit into from
Mar 1, 2023
Merged
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
9 changes: 9 additions & 0 deletions src/i18n/i18nConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// dayjs locales must be imported as well, list: https://github.com/iamkun/dayjs/tree/dev/src/locale
import "dayjs/locale/cs";
import "dayjs/locale/da";
import "dayjs/locale/es";
import "dayjs/locale/fi";
import "dayjs/locale/it";
Expand All @@ -11,6 +12,7 @@ import LanguageDetector from "i18next-browser-languagedetector";
import { initReactI18next } from "react-i18next";
// import our translations
import cs from "~/i18n/locales/cs/translation.json";
import da from "~/i18n/locales/da/translation.json";
import en from "~/i18n/locales/en/translation.json";
import es from "~/i18n/locales/es/translation.json";
import fi from "~/i18n/locales/fi/translation.json";
Expand All @@ -34,6 +36,12 @@ export const resources = {
components: cs.components,
permissions: cs.permissions,
},
da: {
translation: da.translation,
common: da.common,
components: da.components,
permissions: da.permissions,
},
es: {
translation: es.translation,
common: es.common,
Expand Down Expand Up @@ -76,6 +84,7 @@ export const resources = {
export const supportedLocales = [
{ locale: "en", label: "English" },
{ locale: "cs", label: "Czech" },
{ locale: "da", label: "Danish" },
{ locale: "es", label: "Español" },
{ locale: "fi", label: "Finnish" },
{ locale: "it", label: "Italiano" },
Expand Down