feat: add localeAlias options

This commit is contained in:
ermin.zem
2016-03-16 19:05:43 +08:00
committed by fengmk2
parent b5c5c2e47a
commit ec48f1f20c
3 changed files with 38 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ Patch locales functions to koa app.
- {String} defaultLocale: default locale. Optional, default is `en-US`.
- {String} queryField: locale field name on query. Optional, default is `locale`.
- {String} cookieField: locale field name on cookie. Optional, default is `locale`.
- {Object} localeAlias: locale cookie value map. Optional, default is {}.
- {String|Number} cookieMaxAge: set locale cookie value max age. Optional, default is `1y`, expired after one year.
```js