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)