Migrate translations to gettext

This commit is contained in:
2022-12-26 15:14:16 +01:00
parent e4c89f4baa
commit 14ef9100d5
37 changed files with 2511 additions and 757 deletions

View File

@ -24,14 +24,9 @@ Recommended schedule:
Translating:
------------
Copy `lang_en.php` and rename it to `lang_YOUR_LANGCODE.php`
Then edit the file and translate the messages into your language and change $I to $T at the top.
If you ever use a ' character, you have to escape it by using \' instead, or the script will fail.
When you are done, you have to edit `common_config.php`, to include your translation. Simply add a line with
`'lang_code' => 'Language name',`
to the $L array below the settings, similar to what I did for the German translation.
Please share your translation with me, so I can add it to the official version.
To update your translation, you can copy each new string to your translation file or edit the automated `lang_update.php` script to reflect you language and run it.
The scrip `update-translations.sh` can be used to update the language template and translation files from source.
It will generate the file `locale/main-website.pot` which you can then use as basis to create a new language file in `YOUR_LANG_CODE/LC_MESSAGES/main-website.po` and edit it with a translation program, such as [Poedit](https://poedit.net/).
Once you are done, you can open a pull request, or [email me](mailto:daniel@danwin1210.de), to include the translation.
Live Demo:
----------