@artshell/tolgee-format-icu-jsx-param
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Tolgee format ICU plugin with JSX param support

this is an alternative of Tolgee ICU formatter if you are using React and want to pass JSX in params when using the "argument" notation (ex: "Hello {thing}").

Installation

npm install @artshell/tolgee-format-icu-jsx-param

Usage

First, create a Tolgee instance and run it.

import { FormatIcu } from "@artshell/tolgee-format-icu-jsx-param";

const tolgee = Tolgee()
  .use(FormatIcu())
  .init(...)

...

Now you can use ICU format in your translations. Example:

tolgee.t("test", "Hello {thing}", { thing: <strong>world</strong> });
// 'Hello <strong>world</strong>'

for more information refer to Tolgee ICU formatter

Package Sidebar

Install

npm i @artshell/tolgee-format-icu-jsx-param

Weekly Downloads

156

Version

1.0.0

License

MIT

Unpacked Size

2.25 MB

Total Files

32

Last publish

Collaborators

  • gawaine
  • sarileoni
  • mapteo
  • visconti
  • kalimantos
  • maku85
  • robertaracco