Page 1 of 1

Text-module for easy install languages

Posted: Tue 11. Nov 2003, 00:33
by Moozie
To make other languages possible it is maybe a good idea not to work with hard-coded language in the php files, but with variables. And supply a seperate file with all the translations of these variables.

Example:
In the form-handling you get a page with all the filled fields when you press "send". That page is in German. It says something like: "Felden" und "Wert" or something.
A variation could be: $text1 and $text2.
And in a seperate language file:
$text1 = "Felden";
$text2 = "Wert";

So people can easily translate the whole file with maybe hundreds of lines like: $text345 etc.

Also easy when installing updates.

Posted: Tue 11. Nov 2003, 00:53
by ruben
That would save 'everybody' including Oliver a lot of time in the 'long run'

just my 2 cents

ruben

Posted: Tue 11. Nov 2003, 01:08
by Oliver Georgi
That's the only possible way that makes sense - split everything into var/value and make different easy to translate language include files.

Posted: Tue 11. Nov 2003, 01:10
by ruben
just use the same solution as for example phpnuke uses. really great with just 1 (and maybe 1 for the admin part) translation file.

Ruben