Skip to main content
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:393

Extends

  • PluginOptions<T>

Type Parameters

T

T = object

Properties

appendNamespaceToCIMode?

optional appendNamespaceToCIMode?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:665 Prefixes the namespace to the returned key when using cimode

Default


appendNamespaceToMissingKey?

optional appendNamespaceToMissingKey?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:545 Appends namespace to missing key

Default


backend?

optional backend?: Options<T>
Defined in: packages/i18next-backend/dist/esm/index.d.ts:26

Inherited from

PluginOptions.backend

cache?

optional cache?: object
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:167 Options for cache layer - check documentation of plugin

Default

Inherited from

PluginOptions.cache

cacheInBuiltFormats?

optional cacheInBuiltFormats?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:752 Initializes the internal formatter for the in-built formats as cached version. Can be set to false for this type of issues: https://github.com/i18next/i18next/issues/2227

Default


cleanCode?

optional cleanCode?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:467 Language will be lowercased EN —> en while leaving full locales like en-US

Default


compatibilityJSON?

optional compatibilityJSON?: "v4"
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:672 Compatibility JSON version

Warning

only v4 is available and supported by typescript

Default


contextSeparator?

optional contextSeparator?: string
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:659 Char to split context from key

Default


debug?

optional debug?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:398 Logs info level to console output. Helps finding issues with loading not working.

Default


defaultNS?

optional defaultNS?: string | false | readonly string[]
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:479 Default namespace used if not passed to translation function

Default


detection?

optional detection?: object
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:155 Options for language detection - check documentation of plugin

Default

Inherited from

PluginOptions.detection

fallbackLng?

optional fallbackLng?: false | FallbackLng
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:428 Language to use if translations in user language are not available.

Default


fallbackNS?

optional fallbackNS?: string | false | readonly string[]
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:485 String or array of namespaces to lookup key if not found in given namespace.

Default


i18nFormat?

optional i18nFormat?: object
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:173 Options for i18n message format - check documentation of plugin

Default

Inherited from

PluginOptions.i18nFormat

ignoreJSONStructure?

optional ignoreJSONStructure?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:719 Automatically lookup for a flat key if a nested key is not found an vice-versa

Default


initAsync?

optional initAsync?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:630 Triggers resource loading in init function inside a setTimeout (default async behaviour). Set it to false if your backend loads resources sync - that way calling i18next.t after init is possible without relaying on the init callback.

Default


initImmediate?

optional initImmediate?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:635

Deprecated

Use initAsync instead.

interpolation?

optional interpolation?: InterpolationOptions
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:616

See

https://www.i18next.com/translation-function/interpolation

joinArrays?

optional joinArrays?: string | false
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:605 Char, eg. ‘\n’ that arrays will be joined by

Default


keySeparator?

optional keySeparator?: string | false
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:641 Char to separate keys

Default


lng?

optional lng?: string
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:422 Language to use (overrides language detection)

Default


load?

optional load?: "all" | "currentOnly" | "languageOnly"
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:449 Language codes to lookup, given set language is ‘en-US’: ‘all’ —> [‘en-US’, ‘en’, ‘dev’], ‘currentOnly’ —> ‘en-US’, ‘languageOnly’ —> ‘en’

Default


locizeLastUsed?

optional locizeLastUsed?: object
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:678 Options for https://github.com/locize/locize-lastused

allowedHosts?

optional allowedHosts?: readonly string[]
Hostnames that are allowed to send last used data. Please keep those to your local system, staging, test servers (not production)
Default

apiKey?

optional apiKey?: string
An api key if you want to send missing keys

debounceSubmit?

optional debounceSubmit?: number
Debounce interval to send data in milliseconds
Default

projectId

projectId: string
The id of your locize project

referenceLng?

optional referenceLng?: string
The reference language of your project
Default

version?

optional version?: string
Version
Default

Default


lowerCaseLng?

optional lowerCaseLng?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:461 Language will be lowercased eg. en-US —> en-us

Default


maxParallelReads?

optional maxParallelReads?: number
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:728 Limit parallelism of calls to backend This is needed to prevent trying to open thousands of sockets or file descriptors, which can cause failures and actually make the entire process take longer.

Default


maxRetries?

optional maxRetries?: number
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:737 The maximum number of retries to perform. Note that retries are only performed when a request has no response and throws an error. The default value is used if value is set below 0.

Default


missingInterpolationHandler?

optional missingInterpolationHandler?: (text, value, options) => any
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:551 Gets called in case a interpolation value is undefined. This method will not be called if the value is empty string or null

Parameters

text
string
value
any
options
InitOptions

Returns

any

Default


missingKeyHandler?

optional missingKeyHandler?: false | ((lngs, ns, key, fallbackValue, updateMissing, options) => void)
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:524 Used for custom missing key handling (needs saveMissing set to true!)

Default


missingKeyNoValueFallbackToKey?

optional missingKeyNoValueFallbackToKey?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:518 Used to not fallback to the key as default value, when using saveMissing functionality. i.e. when using with i18next-http-backend this will result in having a key with an empty string value.

Default


nonExplicitSupportedLngs?

optional nonExplicitSupportedLngs?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:440 If true will pass eg. en-US if finding en in supportedLngs

Default


ns?

optional ns?: string | readonly string[]
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:473 String or array of namespaces to load

Default


nsSeparator?

optional nsSeparator?: string | false
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:647 Char to split namespace from key

Default


partialBundledLanguages?

optional partialBundledLanguages?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:416 Allow initializing with bundled resources while using a backend to load non bundled ones.

Default


pluralSeparator?

optional pluralSeparator?: string
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:653 Char to split plural from key

Default


postProcess?

optional postProcess?: string | false | readonly string[]
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:563 String or array of postProcessors to apply per default

Default


postProcessPassResolved?

optional postProcessPassResolved?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:569 passthrough the resolved object including ‘usedNS’, ‘usedLang’ etc into options object of postprocessors as ‘i18nResolved’ property

Default


preload?

optional preload?: false | readonly string[]
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:455 Array of languages to preload. Important on server-side to assert translations are loaded before rendering views.

Default


react?

optional react?: ReactOptions
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:622 Options for react - check documentation of plugin

Default


resources?

optional resources?: Resource
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:410 Resources to initialize with (if not using loading or not appending using addResourceBundle)

Default


retryTimeout?

optional retryTimeout?: number
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:745 Set how long to wait, in milliseconds, between retries of failed requests. This number is compounded by a factor of 2 for subsequent retry. The default value is used if value is set below 1ms.

Default


returnDetails?

optional returnDetails?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:593 Returns an object that includes information about the used language, namespace, key and value

Default


returnEmptyString?

optional returnEmptyString?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:581 Allows empty string as valid translation

Default


returnNull?

optional returnNull?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:575 Allows null values as valid translation

Default


returnObjects?

optional returnObjects?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:587 Allows objects as valid translation result

Default


saveMissing?

optional saveMissing?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:491 Calls save missing key function on backend if key not found.

Default


saveMissingPlurals?

optional saveMissingPlurals?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:497 Calls save missing key function on backend if key not found also for plural forms.

Default


saveMissingTo?

optional saveMissingTo?: "all" | "current" | "fallback"
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:511

Default


showSupportNotice?

optional showSupportNotice?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:404 Show support notice in console during initialization.

Default


simplifyPluralSuffix?

optional simplifyPluralSuffix?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:557 Will use ‘plural’ as suffix for languages only having 1 plural form, setting it to false will suffix all with numbers

Default


supportedLngs?

optional supportedLngs?: false | readonly string[]
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:434 Array of allowed languages

Default


updateMissing?

optional updateMissing?: boolean
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:506 Experimental: enable to update default values using the saveMissing (Works only if defaultValue different from translated value. Only useful on initial development or when keeping code as source of truth not changing values outside of code. Only supported if backend supports it already)

Default

Methods

overloadTranslationOptionHandler()?

optional overloadTranslationOptionHandler(args): TOptions
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:611 Sets defaultValue

Parameters

args
string[]

Returns

TOptions

Default


parseMissingKeyHandler()?

optional parseMissingKeyHandler(key, defaultValue?, options?): any
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:539 Receives a key that was not found in t() and returns a value, that will be returned by t()

Parameters

key
string
defaultValue?
string
options?
any

Returns

any

Default


returnedObjectHandler()?

optional returnedObjectHandler(key, value, options): void
Defined in: node_modules/.pnpm/i18next@25.10.10_typescript@7.0.2/node_modules/i18next/typescript/options.d.ts:599 Gets called if object was passed in as key but returnObjects was set to false

Parameters

key
string
value
string
options
any

Returns

void

Default