0.5.0 • Published 7 years ago

open-i18n v0.5.0

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

open-i18n

=================

Build status codecov

Quick start

Usage

var i18n = require('i18n');

// languages System allow language
// locale Current request use lanuage
// language packages,
/*
  {
    "zh": {
      "hello world": "你好世界。"
    },
    "en": {
      "hello world": "Hello world."
    }
  }
 */
var t = i18n(languages, locale, LANGS).t;

t('hello world'); // return "你好世界"

// middle-ware auto handle res.body when request error
server.use(i18n.middleWare(languages, defaultLanguage, LANGS))

Collect language items

Translate language items

Edit en.po, zh.po to translate.

Make language package

0.5.0

7 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago