In the directory of your clout-js application, do the following;
- Install this package
npm install clout-i18n
- Add this module to
package.json
orclout.json
{
...
"modules": ["clout-i18n"]
...
}
Create a new file i18n.default.js
or i18n.<YOUR_ENV>.js
in /conf
directory with the following JavaScript.
module.exports = {
i18n: {
locales:['en'],
directory: '/locales'
}
};
This module utilizes i18n-node to provide the power of internationalization. Please read the documentation on how to leverage the library.
The library is injected into the scope of APIs and Controllers.