Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    rind-i18npublic

    rind-i18n

    Turn a collection of messageformat json files into a dictionary object.

    Usage

    Given the file structure:

    └── lang
        ├── en-US
        │   └── foo
        │       └── main.json
        └── fr-FR
            └── foo
                └── main.json
    

    Usage:

    var opts = {
      cwd: process.cwd(), // default
      glob: '**/*.json'   // default
    }
    var dictionary = require('rind-i18n')(opts);
    
    dictionary['en-US']['foo/main'].greeting() // hello
    dictionary['fr-FR']['foo/main'].greeting() // bonjour
    

    Keywords

    install

    npm i rind-i18n

    Downloadsweekly downloads

    0

    version

    0.2.2

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar