3.1.0 • Published 7 years ago

g11n v3.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

g11n Build Status

The g11n library was designed to allow user integrate difference language file into their application.

CHANGELOG

2016-08-29 update version 3.0.1

2016-08-04 update version 2.0.1

Usage

package.json

{
  "package": {
    "name": "g11n",
    "version": "1.0.0",
    "description_1": "This package name is `:name` and version is `:version`",
    "description_2": "This package name is `{%name%}` and version is `{%version%}`"
  }
}

js

  var g11n = new G11N()
  
  g11n.imports({ files: ['package.json'] }, function() {
    // g11n.t
    console.log(g11n.t('package.name'))

    // g11n.t with replace
    g11n.t('package.description_1', { replaces: { ':name': 'g11n', ':version': '1.0.0' }))

    // g11n.render with Regular Expression
    g11n.render('This package is {%name%} and version is {%version%}', { path: 'package' })
  })

Support

If you have any problem or suggestion please open an issue here.

License

The MIT License

Copyright (c) 2015, leo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3.1.0

7 years ago

3.0.9

7 years ago

3.0.8

8 years ago

3.0.7

8 years ago

3.0.6

8 years ago

3.0.5

8 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

1.2.4

8 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago