Use PHP files for translation

For the use of translation why not use php files like this instead of .mo files :

$lang['global.sign_up'] = 'S\'enregistrer';
$lang['global.login'] = 'Login';

Comments

  • acrylian Administrator, Developer
    Because gettext is a general PHP extension available even on standard host. Why invent such a workaround if a convenient tool is existing? It is much more convenient to handle as you can set the text to translate right in the code where they are. There are also quite convenient translation (free) editors like Poedit (or even command line for the die hard purists) that can parse to collect and update the translation catalog automatically.
Sign In or Register to comment.