dify/web/i18n-config/settings.ts
Stephen Zhou b9fde89781
refactor(web): migrate i18n to selector optimize mode (#38657)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-10 09:35:31 +00:00

19 lines
431 B
TypeScript

import type { InitOptions } from 'i18next'
import { defaultNS, namespaces } from './resources'
export function getInitOptions(): InitOptions {
return {
// We do not have en for fallback
load: 'currentOnly',
fallbackLng: 'en-US',
partialBundledLanguages: true,
defaultNS,
enableSelector: 'optimize',
keySeparator: false,
ns: namespaces,
interpolation: {
escapeValue: false,
},
}
}