babel-plugin-convert-to-i18next
v1.0.2
Published
Convert po gettext file formats to i18next json on import
Downloads
5
Maintainers
Readme
babel-plugin-convert-to-i18next
Convert po file (gettext) formats to i18next json on import. Support version node 6 and Babel 7. (Tested version)
Example
In
import fr from './translation.po'
const fr = require('./translation.po')
Out
const fr = <JSON>
Installation
$ npm install babel-plugin-convert-to-i18next
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["convert-to-i18next"]
}
Via CLI
$ babel --plugins convert-to-i18next script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["convert-to-i18next"]
});