I have a question and a suggestion about the Language setup. After installing mediawiki 1.1.0 on my powerbook with OSX 10.3, I was playing around with the language setup and encounter the following problem:
Suppose I want to try to do a L10N for a language whose LanguageXX.php is not contained in the source of mediawiki. So I try to, say, copy LanguageFr.php into LanguageXx.php and set $wgLanguageCode = "xx" in LocalSettings.php. But it seems that it doesn't work. French interface won't show up and it falls back to English interface. How do I fix this problem? Also, does the language code need to be two letters? Can I have $wgLanguageCode = "xyz" or "xx-yyy" ,etc.
And this links to my suggestion. Is it possible to let user choose the user interface language? Even in the case of xx.wikipedia.org, where there is definitely strong correlation between the language used for the content and for the interface. It might be desirable for some people sometimes to choose a interface language which is different from the language used for the content. (and it will be even more desirable if the content of the site is multi-lingo in nature). But it seems to me that the current code does NOT provide this flexibility? (I might be wrong).
best pochung
On Jan 30, 2004, at 18:13, Tan PekTiong wrote:
I have a question and a suggestion about the Language setup. After installing mediawiki 1.1.0 on my powerbook with OSX 10.3, I was playing around with the language setup and encounter the following problem:
Suppose I want to try to do a L10N for a language whose LanguageXX.php is not contained in the source of mediawiki. So I try to, say, copy LanguageFr.php into LanguageXx.php and set $wgLanguageCode = "xx" in LocalSettings.php. But it seems that it doesn't work. French interface won't show up and it falls back to English interface. How do I fix this problem?
First, double-check that you put the file in the right place. Then, double-check that you're not seeing a cached copy; visit a brand-new page.
If it's still coming up in English, the most likely thing is that there's some little syntax error in the new language file; error messages are suppressed on the include so that a language that hasn't been localized will silently fall back on defaults. To expose the errors, find this line at the bottom of Language.php:
@include_once( "Language" . ucfirst( $wgLanguageCode ) . ".php" );
and remove the "@". Reload, and you may find your screen filled with lovely error messages.
Also, does the language code need to be two letters? Can I have $wgLanguageCode = "xyz" or "xx-yyy" ,etc.
It can be three or more letters, sure. I don't think dashes will currently work, as the LanguageXx-yyy subclass wouldn't be a valid symbol. You could get around this by fiddling with Setup.php.
And this links to my suggestion. Is it possible to let user choose the user interface language?
Not yet. In theory this is possible, though it would actually be harder with changes we've recently made that make various interface text bits editable. That makes them tied to the particular database in use.
Currently things that are inherent to how the wiki works (what page is the main page, the names of namespaces, how to munge URLs and search text) are tied together with interface language.
-- brion vibber (brion @ pobox.com)
Another thing to check; if you just copy LanguageFr.php without changing it, it won't work. Each language file defines a subclass of Language (or LanguageUtf8), eg LanguageEn, LanguageFr. If the name doesn't match the given language code, it won't be loaded.
-- brion vibber (brion @ pobox.com)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Le Saturday 31 January 2004 03:28, Brion Vibber a écrit :
And this links to my suggestion. Is it possible to let user choose the user interface language?
Not yet. In theory this is possible, though it would actually be harder with changes we've recently made that make various interface text bits editable. That makes them tied to the particular database in use.
Currently things that are inherent to how the wiki works (what page is the main page, the names of namespaces, how to munge URLs and search text) are tied together with interface language.
Actually, that's what we need for Wikisource and Wikibooks. So we'll need to go somewhere this way.
I was trying to figure out what need to be changed, so I you have any idea where to start, I will look into that.
-- brion vibber (brion @ pobox.com)
Yann - -- http://www.non-violence.org/ | Site collaboratif sur la non-violence http://www.forget-me.net/ | Alternatives sur le Net http://fr.wikipedia.org/ | Encyclopédie libre http://www.forget-me.net/pro/ | Formations et services Linux
On Fri, Jan 30, 2004 at 06:13:46PM -0800, Tan PekTiong wrote:
Suppose I want to try to do a L10N for a language whose LanguageXX.php is not contained in the source of mediawiki. So I try to, say, copy LanguageFr.php into LanguageXx.php and set $wgLanguageCode = "xx" in LocalSettings.php. But it seems that it doesn't work.
It must be Xx
ciao, tom
wikitech-l@lists.wikimedia.org