From 451e42b35d7213b532bf7ff20a47fbcf4282105e Mon Sep 17 00:00:00 2001 From: spaenleh Date: Thu, 7 Nov 2024 14:37:01 +0100 Subject: [PATCH] fix: add options in build i18n --- src/i18n.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n.ts b/src/i18n.ts index 141cff3f..a28ce5a2 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -1,4 +1,4 @@ -import i18n from 'i18next'; +import i18n, { InitOptions } from 'i18next'; import { ar, de, en, fr, it, es, namespaces } from './langs/index.js'; @@ -7,6 +7,7 @@ export const DEFAULT_LANG = 'en'; export const buildI18n = ( defaultNamespace = namespaces.messages, debug?: boolean, + options?: Partial, ) => { i18n.init({ resources: { @@ -30,6 +31,7 @@ export const buildI18n = ( escapeValue: false, formatSeparator: ',', }, + ...options, }); return i18n;