Skip to content

Commit

Permalink
better opts repres. --README πŸ“‹ ..
Browse files Browse the repository at this point in the history
  • Loading branch information
3imed-jaberi committed Nov 2, 2020
1 parent 1c539dd commit 2a14b95
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ locales(app, options);

Patch locales functions to koa app.

- {Application} app: koa app instance.
- {Object} options: optional params.
- {String} functionName: locale function name patch on koa context. Optional, default is `__`.
- {String} dirs: locales resources store directories. Optional, default is `['$PWD/locales']`.
- {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`.
- {String} cookieDomain: domain on cookie. Optional, default is `''`.
- {Object} localeAlias: locale value map. Optional, default is `{}`.
- {String|Number} cookieMaxAge: set locale cookie value max age. Optional, default is `1y`, expired after one year.
- {Application} **app**: koa app instance.
- {Object} **options**: optional params.
- {String} **functionName**: locale function name patch on koa context. Optional, default is `__`.
- {String} **dirs**: locales resources store directories. Optional, default is `['$PWD/locales']`.
- {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`.
- {String} **cookieDomain**: domain on cookie. Optional, default is `''`.
- {Object} **localeAlias**: locale value map. Optional, default is `{}`.
- {String|Number} **cookieMaxAge**: set locale cookie value max age. Optional, default is `1y`, expired after one year.

```js
locales({
Expand Down

0 comments on commit 2a14b95

Please sign in to comment.