From: Arno H. <aho...@in...> - 2000-10-01 19:40:55
|
> Hmm. Now that I write this down, we can have both. We should > definately use the gettext tools for the translators. They produce > the .po files, and it would be a shame not to use the built-in > localisation mechanism for php4. > But maybe we can easily provide a fallback for php3 users: > and use a script to generate the fallback $locale table from > the .po file. So I installed the gettext package and your script runs ok now. Ok, maybe we should use gettext to automatically produce files for the translators. But I would still use hash-tables for phpwiki (generated automatically from those .po files if you like). Apart from avoiding duplicate information (.mo and .php3 files) and being usable by php3 users, it has the cons of both approaches, plus another one: How can you have per-visitor localization? Say, e.g. the wiki is dutch, but I want to see the edit-page in English. This should easily be possible, by detecing the LANG of the visitor and using that one for templates etc. Of course, the content of the page doesn't change. Problem: our WikiPageNames are localized as well, i.e. if I would simply switch from NL to US phpwiki would install the "FrontPage" page, as it doesn't exist in a Dutch wiki. Therefore phpwiki would have to distinguish between two languages: the visitor's language and the base wiki language. A modified gettext call could take a second argument in order to tell which language to use (base for pagenames, visitor for everything else). The php-gettext doesn't allow per-call setting of the language, does it? Or is this feature too far off the mark? On a side note: I think all files for translators should be moved into a "translator" directory: currently that is translate.sh and the files in the po directory. That way one can easily delete stuff unnecessary for running the wiki. And I don't understand why we need wiki_linguas.php3. Either the pagename occurs somwhere and that usage is localized or it doesn't occur and there's no need to include it in a file like wiki_linguas. Can you give me an example of where wiki_linguas is necessary? /Arno |