Topic on Project:Support desk

Define localization translation for namspace via mediawiki namespace

7
Summary by 星耀晨曦

Editing MediaWiki:Conversion-nsX (where X is a namespace code) can customize the page title prefix of a namespace.

星耀晨曦 (talkcontribs)

I define a new customized namespace in my wiki. Can I define a localization translation for namspace via mediawiki namespace?

Ciencia Al Poder (talkcontribs)

Unless the customized namespace is in an extension, I think most you can do is create aliases for it, but the namespace will always be displayed in it's canonical form. Since one wiki has only one default language it wouldn't make sense otherwise.

星耀晨曦 (talkcontribs)

zh:Wikipedia:互助客栈/条目探讨 this kind title of pages, how to define it? The real namespace looks like still Wikipedia, but prefix of the title display "维基百科" and the drop-down meun contain "维基百科" in zh:Special:前缀索引 and other special page. Define namespace alias can not do this.

Ciencia Al Poder (talkcontribs)

Set the chinese name as the namespace name, and the english as a namespace alias. The english name would redirect to the chinese one.

星耀晨曦 (talkcontribs)

But in this way, URL will shows a Chinese prefix not a English prefix, it may not be good for users who use some browsers that URL transcoding is not supported. May not be achieved by modifying LocalSettings.php: 1.custom namespace 2. and can define different name on all pages 3. and URL prefix still English.

Ciencia Al Poder (talkcontribs)

Do the other way round? English for namespace name, chinese for alias. Still, if browser doesn't support chinese characters, and page titles also have chinese characters, the namespace would probably be not the great problem...

Still, if you want to change only the name displayed in the page tab (subject and talk), try editing MediaWiki:Nstab-<namespace name>, like MediaWiki:Nstab-help

星耀晨曦 (talkcontribs)

This is a good idea. I also find the way that I want, editing MediaWiki:Conversion-nsX (where X is a namespace code) can customize the page title prefix of a namespace.