Commit Graph

20 Commits (master)

Author SHA1 Message Date
niftylettuce ca9d0f997e
Merge pull request #42 from tonyStreet/fix/README.md
update readme to correct setLocale function
2020-06-09 22:00:02 -05:00
Anthony Lansangan 8a1f8c02fa update readme to correct setLocale function 2020-06-08 18:40:49 +08:00
Eric Chan 3db636481a Add YAML Support 2019-08-14 10:45:03 -07:00
fengmk2 47162d3230 feat: gettext from app (#38)
```js
app.__(locale, text, value);
```
2019-06-16 21:52:00 +08:00
Yiyu He 0767037b3c
feat: ctx.__setLocale (#36) 2019-04-30 20:11:00 +08:00
Yiyu He 3043365e09 feat: add __getLocaleOrigin (#35)
* chore: test on node 12
2019-04-29 16:15:14 +08:00
fengmk2 08037ee0ae
feat: allow custom locale store cookie domain (#33)
* test: use mocha@4
2019-04-17 10:43:00 +08:00
fengmk2 043fab2b97 Release 1.7.0 2017-04-27 16:17:22 +08:00
Roger Fos Soler c46d049a5e feat: Add more debug information on a 'silly' level 2017-04-27 16:11:25 +08:00
ermin.zem ec48f1f20c feat: add localeAlias options 2016-03-16 20:10:34 +08:00
闲耘™ c4323c2a15 doc(options.dirs): fix api doc 2015-09-21 09:52:19 +08:00
闲耘™ 36bd1d5202 refact(es6): use es6 syntax.
* fixed #10, But iojs-2 not support Object.assign, so use object-assign
  shim instead for now.
* use es6 syntax.
* use eslint to instead jshint.
2015-09-20 14:56:19 +08:00
闲耘™ cc81fbda18 refact(nested-data): transform nested data on load localization data. 2015-09-18 15:14:38 +08:00
Jason Lee 58324a11ff feat: Support nested locale keys.
Example:

```js
{
  model: {
    user: {
      name: 'Real Name',
      createdAt: 'Joined At'
    }
  }
}
```

```js
ctx.__('model.user.name');
ctx.__('model.user.createdAt');
```

The before:

```js
{
  'model.user.name': 'Real Name',
  'model.user.createdAt', 'Joined At'
}
```

Benchmarks:

```
Deeps:  9
  2 tests completed.

  direct read a key x 85,993,593 ops/sec ±1.89% (96 runs sampled)
  by nested         x  4,203,837 ops/sec ±0.98% (93 runs sampled)
```
2015-09-17 18:20:10 +08:00
fengmk2 1c347630f1 fix: readm typo 2015-09-15 10:32:03 +08:00
Jason Lee 5ffefcc982 feat: Multiple locale paths support. 2015-09-14 17:29:46 +08:00
fengmk2 98f9ebcfd4 Release 1.2.0 2015-08-31 01:29:02 +08:00
popomore 757b28d170 feat: paramter support object 2015-07-15 22:25:23 +08:00
fengmk2 a2462e6a84 feat: support *.properties resource files 2015-05-17 21:54:12 +08:00
fengmk2 15864d180d first commit 2015-05-16 22:06:49 +08:00