@voilab/i18next-moleculer-backend

0.0.5 • Public • Published

i18next-moleculer-backend

Usage

const { i18nMixin } = require('i18next-moleculer-backend');

module.exports = {
    name: 'i18n',

    mixins: [ i18nMixin ],

    settings: {
        i18next: {
            ns: 'mynamespace',
            defaultNS: 'mynamespace'
        }
    },

    actions: {
        hello(ctx) {
            const t = this.getT(ctx));
            return t('hello');
        }
    }
};

Package Sidebar

Install

npm i @voilab/i18next-moleculer-backend

Weekly Downloads

14

Version

0.0.5

License

ISC

Unpacked Size

8.74 kB

Total Files

8

Last publish

Collaborators

  • tafel
  • alexandre_voilab