grunt-intranslation
Searches PHP and HBS files for phrases in need of translation.
Getting Started
npm install grunt-intranslation --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
In PHP files, translation tags should look like this:
translate('word', 'tag');
In Handlebars files, translation tags should look like this:
{{trans "word" "tag"}}
It also strips file-name tags at the beginning:
translate("word", "/file.php/tag");
The "intranslation" task
Overview
In your project's Gruntfile, add a section named intranslation
to the data object passed into grunt.initConfig()
.
grunt;
Usage Examples
Default Options
The following options are default - used for testing.
grunt;
Release History
0.0.19 - Add sorting of words. 0.0.18 - Add support for file-name tag. 0.0.17 - Clean up some glitches.