• i18n:
• ConfigurationOptions:
• api? : object
Hash to specify different aliases for i18n's internal methods to apply on the request/response objects (method -> alias). Note that this will not overwrite existing properties with the same name.
default
undefined
- [ method: string]: string
• autoReload? : boolean
Watch for changes in json files to reload locale on updates
default
false
• cookie? : string
Sets a custom cookie name to parse locale settings from
default
null
• defaultLocale? : string
Alter a site wide default locale
default
"en"
• directory? : string
Where to store json files, relative to modules directory
default
"./locales"
• directoryPermissions? : string
Control mode on directory creation. Setting has no effect on win.
default
null
• extension? : string
Setting extension of json files (you might want to set this to '.js' according to webtranslateit)
default
".json"
• fallbacks? : object
Language fallback map
default
{}
- [ locale: string]: string
• indent? : string
What to use as the indentation unit
default
"\t"
• locales? : string[]
Setup some locales - other locales default to en silently
default
[]
• logDebugFn? : function
Setting of log level DEBUG
default
require("debug")("i18n:debug")
▸ (msg
: string): void
Parameters:
Name | Type |
---|---|
msg |
string |
• logErrorFn? : function
Setting of log level ERROR
default
require("debug")("i18n:error")
▸ (msg
: string): void
Parameters:
Name | Type |
---|---|
msg |
string |
• logWarnFn? : function
Setting of log level WARN
default
require("debug")("i18n:warn")
▸ (msg
: string): void
Parameters:
Name | Type |
---|---|
msg |
string |
• objectNotation? : boolean
Enable object notation
default
false
• prefix? : string
Setting prefix of json files name (in case you use different locale files naming scheme (webapp-en.json), rather then just en.json)
default
""
• preserveLegacyCase? : boolean
Downcase locale when passed on queryParam; e.g. lang=en-US becomes en-us. When set to false, the queryParam value will be used as passed; e.g. lang=en-US remains en-US.
default
true
• queryParameter? : string
Query parameter to switch locale (ie. /home?lang=ch)
default
null
• register? : any
object or [obj1, obj2] to bind the i18n api and current locale to
default
null
• syncFiles? : boolean
Sync locale information across all files
default
false
• updateFiles? : boolean
Whether to write new locale information to disk
default
true