Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kosatyi/node-gettext-generator
Generate translation from your project source files to *.po files and compile to *.mo
https://github.com/kosatyi/node-gettext-generator
Last synced: about 2 months ago
JSON representation
Generate translation from your project source files to *.po files and compile to *.mo
- Host: GitHub
- URL: https://github.com/kosatyi/node-gettext-generator
- Owner: kosatyi
- License: mit
- Created: 2015-09-04T11:10:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T01:27:40.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T07:32:20.965Z (2 months ago)
- Language: JavaScript
- Homepage: https://kosatyi.com/node-gettext-generator/
- Size: 107 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Gettext Generator
![npm](https://img.shields.io/npm/v/node-gettext-generator.svg)
![downloads](https://img.shields.io/npm/dt/node-gettext-generator.svg)
![license](https://img.shields.io/npm/l/node-gettext-generator.svg)
![github-issues](https://img.shields.io/github/issues/kosatyi/node-gettext-generator.svg)![nodei.co](https://nodei.co/npm/node-gettext-generator.png?downloads=true&downloadRank=true&stars=true)
## Requirements
Node Gettext Generator requires `Node v0.10.42` or greater.
## Installation
Add dependency to package.json
```php
{
...
"dependencies": {
"node-gettext-generator": "^0.2.9"
}
...
}
```## Example
```javascript
var generator = require('node-gettext-generator');
generator.process({
extract:{
path :['./src/views'],
target:'./src/locale/templates.js'
},
params : {
name: 'messages',
keywords:['_'],
source:['./src/views','./src/js/app','./src/locale'],
target:'./locales',
locales:['ru','en','uk','lv','cs','fr','sk']
},
javascript:{
namespace:'i18n'
}
});
```