wisembly / xgettext
Javascript poEdit parser written in PHP
Installs: 16 988
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 7
Forks: 4
Open Issues: 0
Requires
- php: >=5.3.0
Requires (Dev)
- mikey179/vfsstream: ~1.2
- phpunit/phpunit: *
README
xgettext PHP implementation. Curently provides 2 parsers:
- Javascript parser
- Handlebars parser
Install
The recommended way to install Xgettext is through Composer:
{ "require": { "wisembly/xgettext-php": "@stable" } }
Usage
Parser
Javascript parser
Simply create a new parser in Poedit (name it for example Javascript
)`.
Then, set up xgettext like this:
WARNING: Javascript parser currently parse only 1rst and 2nd arguments. It also do not parse strings with non matching parenthesis. (avoid smileys..)
Handlebars parser
Same like above, just add -l "handlebars"
in yout xgettext
call to stipulate you want
to use handlebars parser with xgettext-php.
JSON Dumper
$ bin/dumper -i input.po -o output.json
Requirements
PHP >= 5.3
Licence
Xgettext is released under the MIT License. See the bundled LICENSE file for details.