-
-
Notifications
You must be signed in to change notification settings - Fork 673
Closed
Description
Hi, I tried new enableSelector
feature and found a couple of bugs.
- InitOptions doesn't have
enableSelector
, so I use workaround to add it there
interface CustomPluginOptions {
enableSelector: true;
}
- after this vscode/Typescript works well, autocomplete works as expected, but:
- i18next doesn't work with proxy
client side i18n initialized like this:
export const initI18next = (
initLocaleContent: ResourceLanguage | null,
initLocale: Locale,
initNamespace: Namespace = defaultNamespace
) => {
const instance = createInstance();
void instance.use(resourcesToBackend(resourceLanguageLoader)).init({
enableSelector: true,
partialBundledLanguages: true,
debug: false,
...(initLocaleContent
? {
resources: { [initLocale]: { [initNamespace]: initLocaleContent } },
lng: initLocale,
preload: [initLocale],
}
: {
lng: 'cimode',
}),
supportedLngs: locales,
fallbackLng: defaultLocale,
defaultNS: defaultNamespace,
fallbackNS: defaultNamespace,
ns: initNamespace,
interpolation: {
// react handles this
escapeValue: false,
},
react: {
useSuspense: true,
},
nsSeparator: ':::',
keySeparator: '::',
pluralSeparator: '##',
contextSeparator: '##',
});
return instance;
};
As you can see on screenshot looks like proxy doesn't use keySeparator
Your Environment
versions:
"i18next": "25.4.1",
"i18next-resources-to-backend": "1.2.1",
Metadata
Metadata
Assignees
Labels
No labels