-
Notifications
You must be signed in to change notification settings - Fork 0
3 Pi Translation
Marc-pi edited this page Dec 13, 2014
·
25 revisions
1. What are the resources translatable in Pi Engine framework?
- All UIs can be translated : installer, modules and Themes, even mail send by the application.
- This covers also Front and Admin sides, and error messages displayed (404, dispatch errors, etc.).
- By default, Pi Engine runs UTF8 character sets.
2. How to install a translation
Each module has a /locale directory : language files have to be installed there.
Ex : usr/module/locale/mymodule/locale/en for english
Once the translation package uploaded in the right module directory, don't forget to update your module from Operation + system -> Modules -> update or update all.
3. How to translate Pi-Engine
Pi Engine uses Gettext library to manage its internationalization.
To manage your translation,you'll need one famous tool : PoEdit
To translate a new language :
- copy the .po files from already available languages (advised: copy english)
- open with PoEdit one .po file, and select your language
- go to Catalog/Preferences : add team on first tab, go to second tab and adapt the path to the source code from your local (to be sure to have up to date values to translate). Click then on OK when changes done.
- click on update button (update from sourcecode), so you retrieve all constant to be translated
- start to translate. You can mark some items as approximative if needed. those will not be displayed within Pi Engine until you unmark those. You can also comment your translation.
- Be careful with texts with apostrophes : use proper delimiters in the proper situation (php, JS, phtml)
- don't forget to save, it will generate automatically the associated .mo file
- do the same for all .po files
- once all done, upload, and don't forget to update all your modules to see your translation
NB : Pi Engine gettext usages are documented in \usr\locale\README.md NB2 : don't forget to encode your mail templates under UFT8 without BOM (not ANSI)