Skip to content

Commit

Permalink
fix: add options in build i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Nov 8, 2024
1 parent 59e0a95 commit 451e42b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/i18n.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -7,6 +7,7 @@ export const DEFAULT_LANG = 'en';
export const buildI18n = (
defaultNamespace = namespaces.messages,
debug?: boolean,
options?: Partial<InitOptions>,
) => {
i18n.init({
resources: {
Expand All @@ -30,6 +31,7 @@ export const buildI18n = (
escapeValue: false,
formatSeparator: ',',
},
...options,
});

return i18n;
Expand Down

0 comments on commit 451e42b

Please sign in to comment.