0.2.1 • Published 6 years ago

i18nlet v0.2.1

Weekly downloads
38
License
MIT
Repository
github
Last release
6 years ago

:globe_with_meridians: i18nlet

GitHub license Github All Releases GitHub last commit Travis CI

NPM

It is a simple internationalization library. (NodeJS, Browser)

:scroll: Releases

Detailed changes for each release are documented in the releases.

:book: Documentation

:rocket: Install


brower: script tag

Direct Download / CDN

<script src="https://unpkg.com/i18nlet/dist/iife.i18nlet.js"></script>

other release files

NPM

npm install --save i18nlet

bower

TODO

Custom Build

You will have to clone directly from GitHub and build i18nlet yourself if you want to use the latest dev build.

git clone https://github.com/fkei/i18nlet.git
npm install
npm run release

---

出力ファイル
├── dist
      ├── amd.riot-i18nlet.js
      ├── amd.riot-i18nlet.js.map
      ├── amd.riot-i18nlet.min.js
      ├── cjs.riot-i18nlet.js
      ├── es.riot-i18nlet.js
      ├── iife.riot-i18nlet.js
      ├── iife.riot-i18nlet.js.map
      └── iife.riot-i18nlet.min.js

:checkered_flag: Getting started

HTML/JavaScript

<script src="https://unpkg.com/i18nlet/dist/iife.i18nlet.js"></script>

<script>
  var i18nlet = new I18nlet().init();
  i18nlet.loads({
`    ja: {
      'emoji.happy': ':)',
      hello: 'こんにちは {{name}} {{emoji.happy}}',
    },
    en: {
      'emoji.happy': ':)',
      hello: 'Hello {{name}} {{emoji.happy}}',
    },`
  });

  var message = i18nlet.i('hello', { name: 'fkei' });
  console.log(message); // output: 'Hello fkei :)'

  var message1 = i18nlet.i('hello', { name: 'fkei' });
  console.log(message1); // output: 'こんにちは fkei :)'

</script>

Develop

eslint

$ npm run eslint

test

$ npm test

:copyright: License

MIT

0.2.1

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago