Frederich, Eric P21322 wrote:
So you would suggest creating another namespace for the German language? Is that how wikipedia does it?
No. Wikipedia uses sub domains, but as you already pointed out earlier that would require multiple wiki installations / databases, and that was what you (and I) wanted to avoid in this case.
I don't want to create a separate site or database. I want to have the same user base, same templates, same images and so on. Would a namespace allow me to do that?
Yes. Only add the following code to LocalSettings.php (reserve an entire "number range", like 1000-1999 for all the languages in the world...):
$wgExtraNamespaces[1000] = "-de";
Note that from the second character and onward any title name is case-sensitive. Remember also to reserve odd numbers for Talk pages, like:
$wgExtraNamespaces[1001] = "-de Diskussion";
You could then go on to specify Swedish and other languages:
$wgExtraNamespaces[1002] = "-se"; $wgExtraNamespaces[1003] = "-se Diskussion";
If you want to enable using sub pages for these new namespaces, then remember to add the following lines too:
$wgNamespacesWithSubpages[1000] = true; $wgNamespacesWithSubpages[1002] = true;
You might also want to specify in advance a reasonable set of Namespaces to be searched as default for new users (they can override the default settings in their user settings):
$wgNamespacesToBeSearchedDefault = array( NS_MAIN => true, 100 => true, 1000 => true, 1002 => false );
etc.
The other thing I have thought about was doing this... +----+------------------------------------------+---+---+ | de | http://www.example.com/wiki/index.php/$1 | 1 | 0 | | en | http://www.example.com/wiki/index.php/$1 | 1 | 0 | +----+------------------------------------------+---+---+
That way English and German pages would exist in the same wiki without and prefixes on the page names.
But then people would tend to get annoyed about the strange search "matches" (a match in the "wrong" language isn't what the person thought of when searching in the other, and vice versa. And "bad matches" is often worse than no matches at all, at least I think so.
In the cases of shared acronyms between the two pages or words that are the same in both languages we would have to add a _de suffix to the page name.
My tip is that if not always distinguishing "de" from "en" by strict naming convention you will only cause a mess. With several people involved you will soon have a mess. Users namely all show a very consistent behavior, but all of them in a different way... :)
In that case links within German pages would have to do stuff like this [[Microsoft Word de|Microsoft Word]]. With a namespace I'm guessing they'd just have to do [[de:Microsoft Word]]...is that correct?
You can of course (technically) do without the de:namespace and instead define the interwiki link to produce suffixes instead:
+----+---------------------------------------------+---+---+ | de | http://www.example.com/wiki/index.php/$1_de | 1 | 0 |
But this solution wouldn't give the user the *option* of "turning off" search from one (or more) languages. I think the Namespace solution would be preferable if one plans to integrate the languages in the same wiki (since it makes languages searchable optionally), but that's only my opinion.
Regards,
// Rolf Lampa
Thanks, ~Eric
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rolf Lampa Sent: Friday, January 12, 2007 4:51 PM To: mediawiki-l@lists.wikimedia.org Subject: Re: [Mediawiki-l] In Other Languages
Frederich, Eric P21322 wrote:
Well, I added these two entries in the database.... +----+---------------------------------------------+---+---+ | de | http://www.example.com/wiki/index.php/de_$1 | 1 | 0 | | en | http://www.example.com/wiki/index.php/$1 | 1 | 0 | +----+---------------------------------------------+---+---+
Now I can have two versions of a page, one in English, and one in German.
You were earlier talking about defining a namespace for separate languages, and that's a good idea since the user can then *optionally* search in several languages simultaneously.
But you if you register the Namespace "De" ( to be used as "De:Title" ) it seems to conflict somehow with the interwiki parsing mechanism for the short [[de:Title]]. Mediawiki won't regard, for some reason, the normal interwiki syntax [[de:Title]] as an interwiki link if there's a namespace with the identical language name/prefix (de:).
Well, that's what I found when I tried it anyway (I was also interested in the same basic idea so I tried it out).
What I didn't understand in your interwiki definition was why there's a white space after de (de_) ? (at least it will be interpreted as a white
space). I expected a namespace (De:). Ehe name "De" won't work as a Nms though since it will cause some kind of conflict with the interwiki link
[[de: ]] ).
Any other Nms name would work though (although one would prefer De: if course). To avoid conflict between the Nms and the language code for the interwiki link I'd use -de: or de-: as namespace names, although a bit ugly looking. The following works (I tested it):
+----+----------------------------------------------+---+---+ | de | http://www.example.com/wiki/index.php/-de:$1 | 1 | 0 |
Regards,
// Rolf Lampa
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l