Example:
<ns id="14" case="first-letter" subpages=""
canonical="Category"
xml:space="preserve">Category</ns>
<ns id="1230" case="first-letter" subpages=""
canonical="Mifos" content=""
xml:space="preserve">Mifos</ns>
Cheers!
Siebrand
On Thu, Nov 21, 2013 at 5:27 PM, Petr Bena <benapetr(a)gmail.com> wrote:
Hi,
Is there some effective way to retrieve a list of namespaces for a
wiki? In huggle we have that hardcoded now, but that kind of suck,
because every wiki can have some custom NS.
Example:
https://github.com/huggle/huggle3-qt-lx/blob/master/huggle/wikipage.hpp
//! Namespaces
enum MediaWikiNS
{
MediaWikiNS_Main,
MediaWikiNS_Talk,
MediaWikiNS_Project,
MediaWikiNS_ProjectTalk,
MediaWikiNS_User,
MediaWikiNS_UserTalk,
MediaWikiNS_Help,
MediaWikiNS_HelpTalk,
MediaWikiNS_Category,
MediaWikiNS_CategoryTalk,
MediaWikiNS_Mediawiki,
MediaWikiNS_MediawikiTalk,
MediaWikiNS_File,
MediaWikiNS_FileTalk,
MediaWikiNS_Portal,
MediaWikiNS_PortalTalk,
MediaWikiNS_Special
};
Is there a way to retrieve:
* Namespace original name (the english one which can be used on any
language wiki, like User or Talk) and its talk id
* Namespace localized name and its talk id (User talk for User)
* Namespace ID
for every namespace that is known by a wiki?
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Siebrand Mazeland
Product Manager Language Engineering
Wikimedia Foundation
M: +31 6 50 69 1239
Skype: siebrand
Support Free Knowledge: