Skip to content

API Reference / @gtkx/i18n / withTranslation

Function: withTranslation() ​

withTranslation<Ns, KPrefix>(ns?, options?): <C, ResolvedProps>(component) => ComponentType<Omit<ResolvedProps, keyof WithTranslation<Ns, undefined>> & WithTranslationProps>

Type Parameters ​

Ns ​

Ns extends string | $Tuple<string> | undefined = undefined

KPrefix ​

KPrefix extends KeyPrefix<Ns> = undefined

Parameters ​

ns? ​

Ns

options? ​

keyPrefix? ​

KPrefix

withRef? ​

boolean

Returns ​

<C, ResolvedProps>(component) => ComponentType<Omit<ResolvedProps, keyof WithTranslation<Ns, undefined>> & WithTranslationProps>