This package has been deprecated

Author message:

deprecated

babel-plugin-tagged-translations

1.0.0 • Public • Published

tagged-translations

Build Status

A dead simple babel-plugin for translating texts in React applications.

Input

<Header>
  t`Hello ${name}!`
</Header>

Output

<Header>
  `Xin chào ${name} 🤣!`
</Header>

Features

  • Build time translation: build app with minimal footprint.
  • Based on ES6 tagged template literals: really helpful for readability/ maintaination/ integrations.
  • Translations are configured in a JSON file.

Usage

Via .babelrc

{
  "plugins": [
    ["tagged-translations", {
      "translation": "./translation.json",
      "tagName": "t"
    }]
  ]
}
  • translation: the location of translation json.
  • tagName: translation tag name. Default: t.

Notes

  • We don't cover 100% cases: don't support \n characters.

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-tagged-translations

Weekly Downloads

0

Version

1.0.0

License

none

Last publish

Collaborators

  • vinhlh