Fwd: Translation of wwwtesting
Grisha Mokhin
mokhin at bog.msu.ru
Wed Feb 5 13:50:56 UTC 2003
Good idea. You might want to check how this translation scheme is
implemented in php sources of SquirrelMail, www.squirrelmail.org -
user agent language is autodetected, so including the line like
include_once ("i18n/de.inc");
is not necessary. More, PHP has gettext support, so writing one's
own function is also not necessary, but it is necessary to build PHP
with gettext support and use the proper structure of translation
catalogs.
Grisha
OJS> Currently, the php scripts of the new web site design automatically
OJS> include a number of English phrases. Of course it is possible to
OJS> translate these by changing the php scripts directly, but that would mean
OJS> that either changes to the php scripts have to be re-entered into all
OJS> translations, or we end up with different code everywhere.
OJS> It also would not allow different languages on _one_ site.
OJS> My idea is to introduce a very simple i18n () function for the php
OJS> scripts. There is no need to make it translate everything - which is
OJS> impossible - but the most important phrases like "Location:", "Help",
OJS> "Website settings", etc., can be translated, and some links can be
OJS> changed to point to translated versions.
OJS> This way, non-English KDE sites could use exactly the same php scripts as
OJS> the English site, and it would be easily possible to switch languages on
OJS> a per page basis.
OJS> The only requirement would be a simple line in every non-English page:
OJS> include_once ("i18n/de.inc");
More information about the kde-www
mailing list