Translation Management

Applies to: v5.0.0 and later

web2project ships with several translations in the locales folder. More are in the locales repository. To use one, copy its folder into locales/ and choose the language under Preferences in the user menu, or set it for everyone with the Host Locale setting and the default user preferences in System Admin.

Creating a translation

So you want to create your own Translation. The good news is that it’s easy. Just follow these instructions to get started:

The editor only saves to languages that already have a folder in locales/ and to installed modules.

Translation file format

Since v5.0, translation (.inc) files are read as data, not run as PHP. Each line is a quoted English string, =>, and the quoted translation, followed by a comma:

'Add a Todo'=>'Ajouter une tâche',
"Task Name"=>"Nom de la tâche",

Single or double quotes both work, and comments are allowed. An entry that contains anything else, such as a variable, a function call or text joined with ., is skipped, and that string shows in English. Translation files written for older versions usually work unchanged; check any that built strings with PHP code.

lang.php in each language folder is still PHP; it describes the language and isn’t affected.

If you have questions or comments, ask in the community discussions.