A i18next backend layer for Zanata
Homepage Repository npm JavaScript Download
npm install i18next-node-zanata-backend@0.0.1
i18next-node-zanata-backend is an i18next backend layer for Zanata.
```
% npm install i18next-node-zanata-backend ```
```js var i18next = require('i18next'); var Backend = require('i18next-node-zanata-backend');
i18next .use(Backend) .init(options); ```
```js { // url to the Zanata server url: 'https://translate.zanata.org',
// API key for Zanata 'api-key': 'API key',
// project name project: 'project name in zanata',
// project version 'project-version': 'version',
// project type 'project-type': 'file|gettext|podir|properties|utf8properties|xliff|xml',
// project config file downloaded from Zanata 'project-config': '/path/to/zanata.xml',
// Get more debugging messages. the default is false
verbose:
// specify the POT directory to read/write. the default is './po' potdir: '/path/to/pot',
// specify the PO directory to read/write. the default is './po' podir: '/path/to/po' } ```
NOTE the key based fallback style is only supported. so you have to set fallbackLng
, keySeparator
, and nsSeparator
as i18next options like:
js
{
nsSeparator: false,
keySeparator: false,
fallbackLng: false
}
See http://i18next.com/translate/keyBasedFallback/ for more details.
MIT