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
2015-07-05 18:14:34 +02:00
..
fr_FR Add .mo file for french locale 2015-07-05 18:14:34 +02:00
localization.pot Add french translation and method 2015-06-18 22:11:59 +02:00
README Add french translation and method 2015-06-18 22:11:59 +02: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

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