import i18next from "i18next";
import { translations } from "./translations";
export const DEFAULT_LOCALE = "nl";
export const i18n = i18next.createInstance();
// eslint-disable-next-line stencil/ban-side-effects
void i18n.init({
    lng: DEFAULT_LOCALE,
    fallbackLng: DEFAULT_LOCALE,
    initImmediate: false,
    interpolation: {
        escapeValue: false,
    },
    defaultNS: "ui",
    ns: ["ui", "errors"],
    resources: {
        nl: {
            ui: translations.nl.ui,
            errors: translations.nl.errors,
        },
        en: {
            ui: translations.en.ui,
            errors: translations.en.errors,
        },
    },
    // Disable the i18next support notice (console.info) to keep logs clean in consuming apps.
    showSupportNotice: false,
});
export const getLocale = (input) => {
    if (input === "nl" || input === "en")
        return input;
    return DEFAULT_LOCALE;
};
//# sourceMappingURL=i18n.js.map
