How to use the node-polyglot.instance 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 ohmlabs / ohm / server / ghost / core / server / helpers / index.js View on Github external
]).then(function (values) {
        if (values[0].value === 'en'
                && _.isEmpty(options.hash)
                && _.isEmpty(values[1].value)) {
            output = defaultString;
        } else {
            output = polyglot().t(key, options.hash);
        }
        return output;
    });
};
github Laures / ghost-openshift-quickstart / core / server / helpers / index.js View on Github external
]).then(function (values) {
        if (values[0].value === 'en'
                && _.isEmpty(options.hash)
                && _.isEmpty(values[1].value)) {
            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