This is an example of how to use angular-gettext, based on TodoMVC.
Things to watch out for:
- Added
angular-gettext
tobower.json
. - Added a
Gruntfile
to extract and compile translations. - Added a language switcher.
- Annotated the views to add translation support.
- Added translations in the
po
folder.
Full usage instructions can be found at https://github.com/johndaley-me/angular-gettext-example.git.
Original README below:
HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
The AngularJS website is a great resource for getting started.
Steps to create the project:
- Clone the angular-gettext project from : [https://github.com/johndaley-me/angular-gettext-example.git]
- Install
npm install
- Install
bower install
- Install POEdit from [http://poedit.net/] - (it's an optional).
- Install Grunt -
npm install -g grunt-cli
- Run
grunt
to generate the template.pot file for export - Goto [https://www.transifex.com/], setup an account and upload the
template.pot
file. - Do translations to the respected International Language.
- Import the translated po files from transifex into the project.
10.Run
grunt
to generate all translated po files.