1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00
hotspot_ynh/sources/i18n/README
2015-06-18 22:11:59 +02:00

23 lines
755 B
Text

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
## 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
```