https://github.com/hfreire/native-speaker
A modern language :cn: :us: localisation library built on top of i18n
https://github.com/hfreire/native-speaker
github-actions i18n language locale localization translation
Last synced: 5 months ago
JSON representation
A modern language :cn: :us: localisation library built on top of i18n
- Host: GitHub
- URL: https://github.com/hfreire/native-speaker
- Owner: hfreire
- License: mit
- Created: 2017-04-02T15:11:50.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-10-04T10:22:11.000Z (9 months ago)
- Last Synced: 2025-10-12T12:53:09.674Z (8 months ago)
- Topics: github-actions, i18n, language, locale, localization, translation
- Language: JavaScript
- Size: 2.81 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# A modern language :cn: :us: localisation library built on top of i18n
[](https://github.com/hfreire/native-speaker/actions?workflow=ci)
[](https://coveralls.io/github/hfreire/native-speaker?branch=master)
[](https://snyk.io/test/github/hfreire/native-speaker)
[](https://github.com/hfreire/native-speaker/releases)
[](https://www.npmjs.com/package/native-speaker)
[](https://www.npmjs.com/package/native-speaker)
> A modern language :cn: :us: localisation library built on top of i18n
### Features
* Supports multiple randomly picked message localisations :white_check_mark:
### How to install
```
npm install native-speaker
```
### How to use
#### Use it in your app
```javascript
const Locale = require('native-speaker')
const message = Locale.get('en', 'hello_world')
```
#### Available environment variables
Variable | Description | Required | Default value
:---:|:---:|:---:|:---:
DEFAULT_LOCALE | The locale to be used when the desired locale is not available. | false | `en`
### How to contribute
You can contribute either with code (e.g., new features, bug fixes and documentation) or by [donating 5 EUR](https://paypal.me/hfreire/5). You can read the [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute with code.
All donation proceedings will go to the [Sverige för UNHCR](https://sverigeforunhcr.se), a swedish partner of the [UNHCR - The UN Refugee Agency](http://www.unhcr.org), a global organisation dedicated to saving lives, protecting rights and building a better future for refugees, forcibly displaced communities and stateless people.
### License
Read the [license](./LICENSE.md) for permissions and limitations.