Skip to content

API Reference / @gtkx/i18n / IcuTransWithoutContextComponent

Interface: IcuTransWithoutContextComponent()

Defined in: node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/index.d.ts:127

IcuTransWithoutContext component for rendering ICU MessageFormat translations This version does not use React context and requires explicit i18n instance

Example

tsx
// Type-safe usage with namespace
<IcuTransWithoutContext<'welcome.message', 'common'>
  i18nKey="welcome.message"
  defaultTranslation="Welcome <0>back</0>!"
  content={[{ type: 'strong', props: {} }]}
  i18n={i18nInstance}
/>

IcuTransWithoutContextComponent<Key, Ns, KPrefix, TContext, TOpt>(props): ReactElement

Defined in: node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/index.d.ts:128

IcuTransWithoutContext component for rendering ICU MessageFormat translations This version does not use React context and requires explicit i18n instance

Type Parameters

Key

Key extends string

Ns

Ns extends Namespace = "translation"

KPrefix

KPrefix = undefined

TContext

TContext extends string | undefined = undefined

TOpt

TOpt extends TOptionsBase & $Dictionary & object = { context: TContext; }

Parameters

props

IcuTransWithoutContextProps<Key, Ns, KPrefix, TContext, TOpt>

Returns

ReactElement

Example

tsx
// Type-safe usage with namespace
<IcuTransWithoutContext<'welcome.message', 'common'>
  i18nKey="welcome.message"
  defaultTranslation="Welcome <0>back</0>!"
  content={[{ type: 'strong', props: {} }]}
  i18n={i18nInstance}
/>

Released under the MPL-2.0 License.