Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zswang/h5i18n
A mobile page of internationalization development framework
https://github.com/zswang/h5i18n
i18n
Last synced: about 1 month ago
JSON representation
A mobile page of internationalization development framework
- Host: GitHub
- URL: https://github.com/zswang/h5i18n
- Owner: zswang
- License: mit
- Created: 2017-04-13T11:00:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-13T07:13:49.000Z (about 7 years ago)
- Last Synced: 2024-05-01T02:21:26.227Z (7 months ago)
- Topics: i18n
- Language: JavaScript
- Size: 139 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
h5i18n
-----------# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url]
A mobile page of internationalization development framework.
## 使用方法
### 创建多语言环境
```js
var langs = new h5i18n.Languages('cn');langs.update('en');
```## API
### 更新语言环境
```js
// function update (locale?: string)
langs.update('en');
```### 获取文本
```js
// function get (text: string, locale?: string)
langs.get('中文');
```## License
MIT © [zswang](http://weibo.com/zswang)
[npm-url]: https://npmjs.org/package/h5i18n
[npm-image]: https://badge.fury.io/js/h5i18n.svg
[travis-url]: https://travis-ci.org/zswang/h5i18n
[travis-image]: https://travis-ci.org/zswang/h5i18n.svg?branch=master
[coverage-url]: https://coveralls.io/github/zswang/h5i18n?branch=master
[coverage-image]: https://coveralls.io/repos/zswang/h5i18n/badge.svg?branch=master&service=github