0.1.0 • Published 9 years ago

i18next-node-zanata-backend v0.1.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
9 years ago

i18next-node-zanata-backend NPM version

i18next-node-zanata-backend is an i18next backend layer for Zanata.

Getting started

#!shell

% npm install i18next-node-zanata-backend

Overview

var i18next = require('i18next');
var Backend = require('i18next-node-zanata-backend');

i18next
  .use(Backend)
  .init(options);

Backend Options

{
  // 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: <boolean>,

  // 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:

{
  nsSeparator: false,
  keySeparator: false,
  fallbackLng: false
}

See http://i18next.com/translate/keyBasedFallback/ for more details.

License

MIT

0.1.0

9 years ago

0.0.1

9 years ago