i18n for salak 2.0
$ npm install --save salak-i18n
In plugin:
module.exports = {
plugin: [
{
name: 'i18n',
package: 'salak-i18n'
}
]
}
root
{String} locales file location, defaultpath.join('config', 'locales')
defaultLocale
{String} defaulten-US
queryField
{String} defaultlocale
cookieField
{String} defaultlocale
localeAlias
{Object} alias for localeswriteCookie
{Boolean} defaulttrue
alias: ctx.gettext
key
**{String} i18n keyargs
{Array} if set, it will be call util.format
return current locale
alias: this.gettext