0.2.2 • Published 7 years ago

i18next-ogma-backend v0.2.2

Weekly downloads
5
License
MIT
Repository
-
Last release
7 years ago

i18next-ogma-backend

This is a simple i18next backend to be used when you have a ogma instance.

Getting started

Source can be installed doing this :

$ npm install i18next-ogma-backend
$ yarn add i18next-ogma-backend

Using it then is quite straightfoward :

import i18next from 'i18next';
import ogmaBackend from 'i18next-ogma-backend';

i18next
.use(ogmaBackend)
.init(i18nextOptions)

Backend Options

The following options are available :

{
  // Your backend URL
  url: 'https://some.url',
  id: 'your client id',
  token: 'your client secret',
}

Please pass the options using the preferred way, using the i18next.init.

import i18next from 'i18next';
import ogmaBackend from 'i18next-ogma-backend';

i18next
.use(ogmaBackend)
.init({
  backend: options,
  ...
})

You can also use the other methods :

import ogmaBackend from 'i18next-ogma-backend';

// construction
const instance = new ogmaBackend(null, options);
// or init
const instance = new ogmaBackend();
instance.init(options);

License

MIT

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago