1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/custom-server-actionhero/config/i18n.js

37 lines
1 KiB
JavaScript
Raw Normal View History

2018-02-27 12:16:17 +00:00
exports['default'] = {
i18n: (api) => {
return {
// visit https://github.com/mashpie/i18n-node to see all configuration options
// locale path can be configired from within ./config/api.js
locales: ['en'],
// how would you like your lanaguages to fall back if a translation string is missing?
fallbacks: {
// 'es': 'en'
},
// configure i18n to allow for object-style key lookup
objectNotation: true,
// should actionhero append any missing translations to the locale file?
updateFiles: true,
// this will configure logging and error messages in the log(s)
defaultLocale: 'en',
// the name of the method by which to determine the connection's locale
// by default, every request will be in the 'en' locale
// this method will be called witin the localiazation middleware on all requests
determineConnectionLocale: 'api.i18n.determineConnectionLocale'
}
}
}
exports.test = {
i18n: (api) => {
return {
updateFiles: true
}
}
}