Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including i18nlet with all npm packages installed. Try it out:

var i18nlet = require("i18nlet")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

i18nlet v0.2.1

Internationalization library. (NodeJS, Browser)

: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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free