ya-locale
v1.0.1
Published
Locale file loader and producer
Downloads
3
Readme
ya-locale
Super simple to use
A simple locale loader and producer, support json
only.
Installation
npm install ya-locale
Usage
Firstly, you will be needed to create a locale
directory including en.json
, zh.json
,jp.json
, etc.
Load your locale directory before you need using them.
require("ya-locale").load("path/to/locale");
const locale = require("ya-locale");
locale("example", "zh");
// ==> 示例