kopia lustrzana https://github.com/FacilMap/facilmap
Enable Spanish translations
rodzic
0661448444
commit
301f0447e5
|
@ -3,6 +3,7 @@ import { type i18n } from "i18next";
|
|||
import { defineComponent, ref, type Directive } from "vue";
|
||||
import messagesEn from "../../i18n/en.json";
|
||||
import messagesDe from "../../i18n/de.json";
|
||||
import messagesEs from "../../i18n/es.json";
|
||||
import messagesNbNo from "../../i18n/nb-NO.json";
|
||||
import messagesRu from "../../i18n/ru.json";
|
||||
import { LANG_COOKIE, LANG_QUERY, decodeQueryString, getAcceptHotI18n, getRawI18n, onI18nReady, setCurrentUnitsGetter } from "facilmap-utils";
|
||||
|
@ -14,6 +15,7 @@ const namespace = "facilmap-frontend";
|
|||
onI18nReady((i18n) => {
|
||||
i18n.addResourceBundle("en", namespace, messagesEn);
|
||||
i18n.addResourceBundle("de", namespace, messagesDe);
|
||||
i18n.addResourceBundle("es", namespace, messagesEs);
|
||||
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
|
||||
i18n.addResourceBundle("ru", namespace, messagesRu);
|
||||
});
|
||||
|
@ -21,6 +23,7 @@ onI18nReady((i18n) => {
|
|||
if (import.meta.hot) {
|
||||
import.meta.hot!.accept(`../../i18n/en.json`, getAcceptHotI18n("en", namespace));
|
||||
import.meta.hot!.accept(`../../i18n/de.json`, getAcceptHotI18n("de", namespace));
|
||||
import.meta.hot!.accept(`../../i18n/es.json`, getAcceptHotI18n("es", namespace));
|
||||
import.meta.hot!.accept(`../../i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
|
||||
import.meta.hot!.accept(`../../i18n/ru.json`, getAcceptHotI18n("ru", namespace));
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import type { i18n } from "i18next";
|
||||
import messagesDe from "../i18n/de.json";
|
||||
import messagesEn from "../i18n/en.json";
|
||||
import messagesEs from "../i18n/es.json";
|
||||
import messagesNbNo from "../i18n/nb-NO.json";
|
||||
import messagesRu from "../i18n/ru.json";
|
||||
import { getAcceptHotI18n, getRawI18n, onI18nReady } from "facilmap-utils";
|
||||
|
@ -11,6 +12,7 @@ const namespace = "facilmap-leaflet";
|
|||
onI18nReady((i18n) => {
|
||||
i18n.addResourceBundle("en", namespace, messagesEn);
|
||||
i18n.addResourceBundle("de", namespace, messagesDe);
|
||||
i18n.addResourceBundle("es", namespace, messagesEs);
|
||||
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
|
||||
i18n.addResourceBundle("ru", namespace, messagesRu);
|
||||
});
|
||||
|
@ -19,6 +21,7 @@ if (import.meta.hot) {
|
|||
if (import.meta.hot) {
|
||||
import.meta.hot!.accept(`../i18n/en.json`, getAcceptHotI18n("en", namespace));
|
||||
import.meta.hot!.accept(`../i18n/de.json`, getAcceptHotI18n("de", namespace));
|
||||
import.meta.hot!.accept(`../i18n/es.json`, getAcceptHotI18n("es", namespace));
|
||||
import.meta.hot!.accept(`../i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
|
||||
import.meta.hot!.accept(`../i18n/ru.json`, getAcceptHotI18n("ru", namespace));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { defaultI18nGetter, getRawI18n, onI18nReady, setLanguageDetector, setI18nGetter, isCustomLanguageDetector, isCustomI18nGetter, LANG_QUERY, LANG_COOKIE, setCurrentUnitsGetter } from "facilmap-utils";
|
||||
import messagesEn from "./i18n/en.json";
|
||||
import messagesDe from "./i18n/de.json";
|
||||
import messagesEs from "./i18n/es.json";
|
||||
import messagesNbNo from "./i18n/nb-NO.json";
|
||||
import messagesRu from "./i18n/ru.json";
|
||||
import type { i18n } from "i18next";
|
||||
|
@ -39,6 +40,7 @@ declare module 'domain' {
|
|||
onI18nReady((i18n) => {
|
||||
i18n.addResourceBundle("en", namespace, messagesEn);
|
||||
i18n.addResourceBundle("de", namespace, messagesDe);
|
||||
i18n.addResourceBundle("es", namespace, messagesEs);
|
||||
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
|
||||
i18n.addResourceBundle("ru", namespace, messagesRu);
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Units } from "facilmap-types";
|
|||
import i18next, { type CustomPluginOptions, type Module, type Newable, type i18n } from "i18next";
|
||||
import LanguageDetector from "i18next-browser-languagedetector";
|
||||
|
||||
export const LANGUAGES = ["en", "de", "nb-NO", "ru"];
|
||||
export const LANGUAGES = ["en", "de", "es", "nb-NO", "ru"];
|
||||
|
||||
export const DEFAULT_LANGUAGE = "en";
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import type { i18n } from "i18next";
|
|||
import { getAcceptHotI18n, getRawI18n, onI18nReady } from "./i18n-utils";
|
||||
import messagesDe from "./i18n/de.json";
|
||||
import messagesEn from "./i18n/en.json";
|
||||
import messagesEs from "./i18n/es.json";
|
||||
import messagesNbNo from "./i18n/nb-NO.json";
|
||||
import messagesRu from "./i18n/ru.json";
|
||||
|
||||
|
@ -11,6 +12,7 @@ const namespace = "facilmap-utils";
|
|||
onI18nReady((i18n) => {
|
||||
i18n.addResourceBundle("en", namespace, messagesEn);
|
||||
i18n.addResourceBundle("de", namespace, messagesDe);
|
||||
i18n.addResourceBundle("es", namespace, messagesEs);
|
||||
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
|
||||
i18n.addResourceBundle("ru", namespace, messagesRu);
|
||||
});
|
||||
|
@ -19,6 +21,7 @@ if (import.meta.hot) {
|
|||
if (import.meta.hot) {
|
||||
import.meta.hot!.accept(`./i18n/en.json`, getAcceptHotI18n("en", namespace));
|
||||
import.meta.hot!.accept(`./i18n/de.json`, getAcceptHotI18n("de", namespace));
|
||||
import.meta.hot!.accept(`./i18n/es.json`, getAcceptHotI18n("es", namespace));
|
||||
import.meta.hot!.accept(`./i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
|
||||
import.meta.hot!.accept(`./i18n/ru.json`, getAcceptHotI18n("ru", namespace));
|
||||
}
|
||||
|
@ -37,6 +40,7 @@ export function getLocalizedLanguageList(): Record<string, string> {
|
|||
return {
|
||||
"en": getI18n().t("i18n.language-en", { lng: "en" }),
|
||||
"de": getI18n().t("i18n.language-de", { lng: "de" }),
|
||||
"es": getI18n().t("i18n.language-es", { lng: "es" }),
|
||||
"nb-NO": getI18n().t("i18n.language-nb-no", { lng: "nb-NO" }),
|
||||
"ru": getI18n().t("i18n.language-ru", { lng: "ru" })
|
||||
};
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"i18n": {
|
||||
"language-en": "Englisch",
|
||||
"language-de": "Deutsch",
|
||||
"language-es": "Spanisch",
|
||||
"language-nb-no": "Norwegisch Bokmål (Norwegen)",
|
||||
"language-ru": "Russian"
|
||||
},
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"i18n": {
|
||||
"language-en": "English",
|
||||
"language-de": "German",
|
||||
"language-es": "Spanish",
|
||||
"language-nb-no": "Norwegian Bokmål (Norway)",
|
||||
"language-ru": "Russian"
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue