Document toolboxDocument toolbox

Translations

Translations in Microbizz are handled by Platform4PHP.

Partner translations

Partners may access the Translate menu item from the "super menu". This requires that they are "admin" and that they have selected a language which isn't english.

From there they may edit the translations that are used on the current page (both javascript and PHP). This is handled by the javascript function partnertranslate_show(). The changes are saved in a list of un-approved translations, they will need to be approved from within contract 2781, on the page /sys/basic/daynweek/partnertranslate.php. A mail is sent (to Ilias) when a partner has made changes.

Approved translations are imported once a day by each server, by a job that calls Microbizz\Utilities\Translations::updateApproved(). This extracts phrases from the code, updates the phrases with the approved translations, and then updates the translation files with the resulting list of phrases.

Global translations

Ventu may translate all of Microbizz from the page /sys/basic/daynweek/globaltranslate.php.

Extracting translations

This section is probably obsolete.

All translations can be extracted from the system by first calling /admin/translations/sys2lang.php and then calling /admin/translations/lang2csv.php on the appropriate server. The first script will ensure that all translation files are updated with all phrases from the code, and the second will extract each set of translations (one for each language) as CSV files in the /translations/ folder on the server.

The CSV files have a simple format, where each line is composed of first the base phrase (in english) and then the translated phrase. In the cases where a phrase isn't translated the second column will be empty and the system will display the base phrase.

Translation is performed by filling out the second column.

Implementing new translations

This section is probably obsolete.

When the CSV files are updated, they need to be re-imported into the system. This is done by calling /admin/translations/csv2lang.php after which the system (on that server) is loaded with the correct translations.

Translation process

Translation is only performed when doing regular system updates, so everything implemented as a hotfix isn't translated if any new phrases are introduced and as such will appear in English until the next regular release.

When the release candidate is prepared, the translations are extracted from the system as described above.

The Danish translation is handled in-house, while the Swedish translation is handled by Brightify. The rest of the translations are handled by our translation agency (LanguageWire).

When translations are received back, they are reimported into the release candidate branch, which is then uploaded to all the servers during our regular upload procedure.


See https://microbizz.atlassian.net/wiki/spaces/RPPRO/pages/17891386/4.+H+ndtering+af+sprog