PHP strings#

PHP translations are usually monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

Weblate currently supports several variants of PHP translations:

Example file:

<?php
$LANG['foo'] = 'bar';
$LANG['foo1'] = 'foo bar';
$LANG['foo2'] = 'foo bar baz';
$LANG['foo3'] = 'foo bar baz bag';

Weblate configuration#

Typical Weblate Component configuration

File mask

lang/*/texts.php

Monolingual base language file

lang/en/texts.php

Template for new translations

lang/en/texts.php

File format

PHP strings