Skip to content

creativelive/rind-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published