i18nlet

0.2.1 • Public • Published

🌐 i18nlet

GitHub license Github All Releases GitHub last commit Travis CI

NPM

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

📜 Releases

Detailed changes for each release are documented in the releases.



📖 Documentation

🚀 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

🏁 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


©️ License

MIT

Readme

Keywords

Package Sidebar

Install

npm i i18nlet

Weekly Downloads

20

Version

0.2.1

License

MIT

Unpacked Size

83.6 kB

Total Files

20

Last publish

Collaborators

  • cathcheeno
  • fkei
  • noritama