Constructors
Methods
getFixedT
- getFixedT<
N extends string
| readonly [string, string] = "translation",
KPrefix extends KeyPrefix<Ns> = undefined,
>(
locale: string,
namespaces?: N,
options?: Omit<InitOptions<object>, "react"> & { keyPrefix?: KPrefix },
): Promise<TFunction<FallbackNs<N>, KPrefix>> Type Parameters
- N extends string | readonly [string, string] = "translation"
- KPrefix extends KeyPrefix<Ns> = undefined
Parameters
- locale: string
Optional
namespaces: NOptional
options: Omit<InitOptions<object>, "react"> & { keyPrefix?: KPrefix }
Returns Promise<TFunction<FallbackNs<N>, KPrefix>>
- getFixedT<
N extends string
| readonly [string, string] = "translation",
KPrefix extends KeyPrefix<Ns> = undefined,
>(
request: Request,
namespaces?: N,
options?: Omit<InitOptions<object>, "react"> & { keyPrefix?: KPrefix },
): Promise<TFunction<FallbackNs<N>, KPrefix>> Type Parameters
- N extends string | readonly [string, string] = "translation"
- KPrefix extends KeyPrefix<Ns> = undefined
Parameters
- request: Request
Optional
namespaces: NOptional
options: Omit<InitOptions<object>, "react"> & { keyPrefix?: KPrefix }
Returns Promise<TFunction<FallbackNs<N>, KPrefix>>
getRouteNamespaces
- getRouteNamespaces(context: EntryContext): string[]
Returns string[]
Return a TFunction that can be used to translate strings server-side. This function is fixed to a specific namespace.