How to use the node-polyglot.instance.t function in node-polyglot

To help you get started, we’ve selected a few node-polyglot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cobyism / ghost-on-heroku / core / server / helpers / index.js View on Github external
]).then(function (values) {
        if (values[0].settings[0] === 'en_US' &&
                _.isEmpty(options.hash) &&
                values[1].settings[0] !== 'true') {
            output = defaultString;
        } else {
            output = polyglot.t(key, options.hash);
        }

        return output;
    });
};

node-polyglot

Give your JavaScript the ability to speak many languages.

BSD-2-Clause
Latest version published 3 months ago

Package Health Score

83 / 100
Full package analysis