2014-11-09 22:49:07 +01:00
|
|
|
Add a "localization.pot" to this directory, and one folder per translated language, containing the po a LC_MESSAGE directory (with the .mo)
|
|
|
|
|
|
|
|
See: https://github.com/YunoHost/admin_v1/tree/master/i18n
|
2015-06-14 23:34:00 +02:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
The next command generates the pot file from templates files
|
|
|
|
```
|
|
|
|
xgettext views/* -o i18n/localization.pot
|
|
|
|
```
|
|
|
|
|
|
|
|
The template must use directly the function ```gettext``` or its alias ```_```.
|
|
|
|
|
|
|
|
The following command generate the .po file for the language fr_FR with UTF-8 as enconding:
|
|
|
|
```
|
|
|
|
msginit --locale=fr_FR.UTF-8 -i i18n/localization.pot -o i18n/fr_FR/localization.po
|
|
|
|
```
|
|
|
|
|
|
|
|
Once the po file fullfilled, you can generate the .mo file used by the system.
|
|
|
|
```
|
|
|
|
msgfmt i18n/fr_FR/localization.po -o i18n/fr_FR/LC_MESSAGES/localization.mo
|
|
|
|
```
|
|
|
|
|