egg-i18next
Install
$ npm i egg-i18next --save
Usage
// {app_root}/config/plugin.jsexportsi18next = enable: true package: 'egg-i18next';
Configuration
// {app_root}/config/config.default.jsexportsi18next = queryField: 'locale' cookieField: 'locale' cookieMaxAge: 365 * 24 * 60 * 60 * 1000 // 1 year loadPath: '/config/locale/{{lng}}.yml' init: // initialization config for i18next, refer to https://www.i18next.com/configuration-options.html for more details. fallbackLng: 'en-US' ;
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.