Topic on Project:Support desk

How to switch from german namespace to english?

8
95.91.200.233 (talkcontribs)

All Namespaces like "Category" "SpecialPages" etc are all in german, but I want them to be in english. How can I achieve that ?

87.123.59.148 (talkcontribs)

I know that you can switch the language of your wiki. You can test that with the uselang parameter appended to one of your wiki URLs:

uselang=en

However, this does not only influence the namespace names, but the display of all interface texts. The request to only change the namespace names to a different language while keeping all other interface texts is not very common, I think. Is there a special reason for why you want that?

95.91.200.233 (talkcontribs)

Yes, I am only on a standard Host that has a pre-set Mediawiki and that is in german, so I can't install it directly in english.

87.123.59.148 (talkcontribs)

So you actually want the wiki to be in English. This can be done by setting $wgLanguageCode in LocalSettings.php.

The above is the real solution. If you want to be able to use your wiki seriously, you should use a host, who allows you to actually modify your files.

A hack to get the same result might be to add a jQuery script to the wiki page MediaWiki:Common.js, which automatically adds the uselang parameter to all links pointing to your wiki. However, before I would write such a script, I would just go to a host, who gives me access to my files.

95.91.200.233 (talkcontribs)

The $wgLanguageCode only makes the wiki english, but not the namespaces.

87.123.13.181 (talkcontribs)

That is partly true: The built-in namespaces are getting translated for me.

Custom namespaces display the name, which is defined in their page in the MediaWiki namespace, e.g. in MediaWiki:Nstab-main for the "Main" namespace. If no translation for that page is present, then - regardless of the selected interface language - the English name will be used. E.g. on page MediaWiki:Nstab-main/de. Otherwise the namespace name will be localized as well.

Ciencia Al Poder (talkcontribs)

What you can control in the MediaWiki namespace is the text of the tab, not the namespace itself (eg: when linking to pages in that namespace or the displayed URL). See Manual:Using custom namespaces

87.123.51.192 (talkcontribs)

If links to these namespaces should be updated, kind of like a mass replacement, then Extension:ReplaceText will be able to do that.

Reply to "How to switch from german namespace to english?"