Hello everyone. I am trying to figure out how to get that side bar "in other languages" working on my Wiki site. In a page called sandbox, I put at the bottom a link [[de:Sandbox]] but it just stayed as a link on the bottom of the page instead of making its way into a new sidebar on the left. What do I have to do to get this working? Is it just a matter of creating the sidebar? If so, how do I do that. Any help is appreciated, I tried looking around but couldn't find much of anything.
MediaWiki 1.7.1
Thanks, ~Eric
On 12/01/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
Hello everyone. I am trying to figure out how to get that side bar "in other languages" working on my Wiki site. In a page called sandbox, I put at the bottom a link [[de:Sandbox]] but it just stayed as a link on the bottom of the page instead of making its way into a new sidebar on the left. What do I have to do to get this working? Is it just a matter of creating the sidebar? If so, how do I do that. Any help is appreciated, I tried looking around but couldn't find much of anything.
Create an interwiki table entry with a prefix corresponding to a language code, e.g. "de".
Rob Church
Where is this interwiki table? Is this done in some php file or via the web interface?
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Friday, January 12, 2007 12:54 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] In Other Languages
On 12/01/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
Hello everyone. I am trying to figure out how to get that side bar
"in
other languages" working on my Wiki site. In a page called sandbox, I put at the bottom a link [[de:Sandbox]]
but
it just stayed as a link on the bottom of the page instead of making
its
way into a new sidebar on the left. What do I have to do to get this working? Is it just a matter of creating the sidebar? If so, how do I do that. Any help is appreciated, I tried looking around but couldn't find much of anything.
Create an interwiki table entry with a prefix corresponding to a language code, e.g. "de".
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Okay, I found it. I guess you were talking about a database table. Silly me. I think I understand what iw_local is for, not too sure about iw_trans.
Lets say my wiki is at....
http://www.example.com/wiki/index.php/
I'm not sure that I can set up a http://de.www.example.com/wiki/index.php/
...because wouldn't that have to be a separate wiki installation?
Can I just put in the interwiki table
values (de,http://www.example.com/wiki/index.php/de:$1,1,0) ?
Would that work okay? Has this been done successfully? Should I set up a namespace for German or leave it all in one namespace? I thought if I set up a new namespace then I couldn't search all by default and I'd have to search one, then the other. It would be nice if I could just do the /index.php/de:$1 thing and it'd work, but I don't want to mess things up.
Thanks, ~Eric
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Frederich, Eric P21322 Sent: Friday, January 12, 2007 2:27 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] In Other Languages
Where is this interwiki table? Is this done in some php file or via the web interface?
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Friday, January 12, 2007 12:54 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] In Other Languages
On 12/01/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
Hello everyone. I am trying to figure out how to get that side bar
"in
other languages" working on my Wiki site. In a page called sandbox, I put at the bottom a link [[de:Sandbox]]
but
it just stayed as a link on the bottom of the page instead of making
its
way into a new sidebar on the left. What do I have to do to get this working? Is it just a matter of creating the sidebar? If so, how do I do that. Any help is appreciated, I tried looking around but couldn't find much of anything.
Create an interwiki table entry with a prefix corresponding to a language code, e.g. "de".
Rob Church
_______________________________________________ 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
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.
But now if I want to link to the German page "de_Beispiel" and have the text be Beispiel, I need to do this... [[de_Beispiel|Beispiel]]
I tried making a template called de so I could just do {{de|Beispiel}} but haven't got it to work, it just makes the text bold. Here is what I have in Template:de
[[de_{{{1}}}|{{{1}}}]]
Any ideas?
Thanks, ~Eric
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Frederich, Eric P21322 Sent: Friday, January 12, 2007 2:56 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] In Other Languages
Okay, I found it. I guess you were talking about a database table. Silly me. I think I understand what iw_local is for, not too sure about iw_trans.
Lets say my wiki is at....
http://www.example.com/wiki/index.php/
I'm not sure that I can set up a http://de.www.example.com/wiki/index.php/
...because wouldn't that have to be a separate wiki installation?
Can I just put in the interwiki table
values (de,http://www.example.com/wiki/index.php/de:$1,1,0) ?
Would that work okay? Has this been done successfully? Should I set up a namespace for German or leave it all in one namespace? I thought if I set up a new namespace then I couldn't search all by default and I'd have to search one, then the other. It would be nice if I could just do the /index.php/de:$1 thing and it'd work, but I don't want to mess things up.
Thanks, ~Eric
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Frederich, Eric P21322 Sent: Friday, January 12, 2007 2:27 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] In Other Languages
Where is this interwiki table? Is this done in some php file or via the web interface?
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Friday, January 12, 2007 12:54 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] In Other Languages
On 12/01/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
Hello everyone. I am trying to figure out how to get that side bar
"in
other languages" working on my Wiki site. In a page called sandbox, I put at the bottom a link [[de:Sandbox]]
but
it just stayed as a link on the bottom of the page instead of making
its
way into a new sidebar on the left. What do I have to do to get this working? Is it just a matter of creating the sidebar? If so, how do I do that. Any help is appreciated, I tried looking around but couldn't find much of anything.
Create an interwiki table entry with a prefix corresponding to a language code, e.g. "de".
Rob Church
_______________________________________________ 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
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
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
So you would suggest creating another namespace for the German language? Is that how wikipedia does it? 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?
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. 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. 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?
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
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
Just a little clarification:
Rolf Lampa wrote:
Frederich, Eric P21322 wrote:
<big snip>
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?
Yes.
What I should have been clearer about below was that you can of course combine the two and use the [[de:title]]-link syntax, but then also define the interwiki to add the suffix (instead of the user having to do BOTH, namely defining both the language directive, [[de: ]], AND the language code again at the end of the title ( [[:de:title de]] ).
For this reason I suggested that the interwiki mechanism could insert the last "de" for you (see the trailing /"$1 de" below, with or without the underscore):
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.
But as said, I still vote for the Namespace solution. =)
Regards,
// Rolf Lampa
mediawiki-l@lists.wikimedia.org