Naval Pilgrim's Mayflower

    ya-locale

    1.0.1 • Public • Published

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

    Keywords

    Install

    npm i ya-locale

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.94 kB

    Total Files

    9

    Last publish

    Collaborators

    • derekchuank