Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ffflabs/gettext-twig
Totally pre-alpha attempt to extract translatable strings from Twig templates
https://github.com/ffflabs/gettext-twig
Last synced: about 2 months ago
JSON representation
Totally pre-alpha attempt to extract translatable strings from Twig templates
- Host: GitHub
- URL: https://github.com/ffflabs/gettext-twig
- Owner: ffflabs
- License: mit
- Created: 2015-07-07T17:45:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-07T17:48:07.000Z (over 9 years ago)
- Last Synced: 2024-10-12T09:48:38.585Z (3 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 3
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gettext-twig
Extract translatable strings from Twig template strings.
It was made to be used with [gmarty/gettext](https://github.com/gmarty/xgettext) and it's
mostly copied from [smhg/gettext-swig](https://github.com/smhg/gettext-swig)**warning:** For the time being, it only extracts string in the form `{% trans "string here" %}` which
is the most basic case described in Twig's [The i18n Extension](http://twig.sensiolabs.org/doc/extensions/i18n.html)## Example usage
```sh
./bin/xgettext-template ./views/twig/menu.twig -k trans
```