1.0.1 • Published 6 years ago
ya-locale v1.0.1
ya-locale
Super simple to use
A simple locale loader and producer, support json only.
Installation
npm install ya-localeUsage
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");
// ==> 示例