All Projects → gilbsgilbs → Babel Plugin I18next Extract

gilbsgilbs / Babel Plugin I18next Extract

Licence: mit
Babel plugin that statically extracts i18next and react-i18next translation keys.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Babel Plugin I18next Extract

Babel Plugin React Intl
Extracts string messages from React components that use React Intl.
Stars: ✭ 430 (+362.37%)
Mutual labels:  babel-plugin, i18n, internationalization
Ember I18n Changeset Validations
ember-i18n support for ember-changeset-validations messages
Stars: ✭ 11 (-88.17%)
Mutual labels:  i18n, internationalization
Pimcore I18n
Pimcore - i18n Manager
Stars: ✭ 19 (-79.57%)
Mutual labels:  i18n, internationalization
Goloc
A flexible tool for application localization using Google Sheets.
Stars: ✭ 42 (-54.84%)
Mutual labels:  i18n, internationalization
Int
Tiny in-browser internationalization.
Stars: ✭ 16 (-82.8%)
Mutual labels:  i18n, internationalization
Translatedjs
Internationalization and localization for JavaScript and Node.js
Stars: ✭ 17 (-81.72%)
Mutual labels:  i18n, internationalization
Texterify
The localization management system.
Stars: ✭ 37 (-60.22%)
Mutual labels:  i18n, internationalization
React I18next
Internationalization for react done right. Using the i18next i18n ecosystem.
Stars: ✭ 6,942 (+7364.52%)
Mutual labels:  i18n, internationalization
Redux React I18n
An i18n solution for React/Redux and React Native projects
Stars: ✭ 64 (-31.18%)
Mutual labels:  i18n, internationalization
Locale2
💪 Try as hard as possible to detect the client's language tag ("locale") in node or the browser. Browserify and Webpack friendly!
Stars: ✭ 65 (-30.11%)
Mutual labels:  i18n, internationalization
Angular I18next
angular v2.0+ integration with i18next v8.4+
Stars: ✭ 69 (-25.81%)
Mutual labels:  i18n, internationalization
Keys Translations Manager
KTM, a locale management web app built on MERN stack, lets you manage and control locales in one place. It's particularly useful for someone who needs to manage multiple internationalization/localization projects.
Stars: ✭ 81 (-12.9%)
Mutual labels:  i18n, internationalization
Django Rosetta
Rosetta is a Django application that eases the translation process of your Django projects
Stars: ✭ 806 (+766.67%)
Mutual labels:  i18n, internationalization
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+867.74%)
Mutual labels:  i18n, internationalization
Frenchkiss.js
The blazing fast lightweight internationalization (i18n) module for javascript
Stars: ✭ 776 (+734.41%)
Mutual labels:  i18n, internationalization
I18n.cr
Internationalization API ( i18n )
Stars: ✭ 31 (-66.67%)
Mutual labels:  i18n, internationalization
Gatsby Starter Prismic I18n
Based on gatsby-starter-prismic with Internationalization (i18n) support
Stars: ✭ 77 (-17.2%)
Mutual labels:  i18n, internationalization
I18next
i18next: learn once - translate everywhere
Stars: ✭ 5,971 (+6320.43%)
Mutual labels:  i18n, internationalization
Vue I18n
🌐 Internationalization plugin for Vue.js
Stars: ✭ 6,502 (+6891.4%)
Mutual labels:  i18n, internationalization
React Intl Hooks
React hooks for internationalization without the hassle ⚛️🌍
Stars: ✭ 64 (-31.18%)
Mutual labels:  i18n, internationalization

Logo

babel-plugin-i18next-extract

License: MIT Build Status Netlify Status Test Coverage

NPM


babel-plugin-i18next-extract is a Babel Plugin that will traverse your Javascript/Typescript code in order to find i18next translation keys.

Features

  • ✅ Keys extraction in JSON v3 format.
  • ✅ Detection of i18next.t() function calls.
  • ✅ Full react-i18next support.
  • ✅ Plurals support.
  • ✅ Contexts support.
  • ✅ Namespace detection.
  • ✅ Disable extraction on a specific file sections or lines using comment hints.
  • ✅ Overwrite namespaces, plurals and contexts on-the-fly using comment hints.
  • … and more?

Documentation

You can check out the full documentation at i18next-extract.netlify.com.

Quick Start

Installation

yarn add --dev babel-plugin-i18next-extract

# or

npm i --save-dev babel-plugin-i18next-extract

Minimal configuration

If you don't have a babel configuration yet, you can follow the Configure Babel documentation page to get started.

Declare the plugin like any other plugin in your .babelrc and you're good to go:

{
  "plugins": [
    "i18next-extract",
    // […] your other plugins […]
  ]
}

You may want to specify additional configuration options:

{
  "plugins": [
    ["i18next-extract", {"nsSeparator": "~"}],
    // […] your other plugins […]
  ]
}

For an exhaustive list of configuration options, check out the Configuration page.

Once the plugin is setup, you can build your app normally or run Babel through Babel CLI:

yarn run babel -f .babelrc 'src/**/*.{js,jsx,ts,tsx}'

# or

npm run babel -f .babelrc 'src/**/*.{js,jsx,ts,tsx}'

Extracted translations land in the extractedTranslations/ directory by default.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].