1.0.1 • Published 4 years ago

ya-locale v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

ya-locale

Build Status npm version

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");
// ==> 示例