Open xbony2 opened 8 years ago
What APIs support these things?
Dunno.
@xbony2 You realise that English namespaces are supported for non-en langauge wikis? e.g. http://minecraft-es.gamepedia.com/File:Minecraft_Wiki_header.svg
As for API that support being able to translate? Not possible, unless you're specifically on a language wiki, and query for it's namespaces/site messages
@Developaws I know that. But putting English names into non-English wikis is unprofessional.
Then query the name spaces by Id lol?
On 12 Nov 2016 10:19 pm, "xbony2" notifications@github.com wrote:
@Developaws https://github.com/Developaws I know that. But putting English names into non-English wikis is unprofessional.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FTB-Gamepedia/MediaWiki-Butt-Ruby/issues/22#issuecomment-260152349, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHSUIyzRfuBvrNy4BWaUhIh6nXzFLzlks5q9jtggaJpZM4HQDyB .
Not sure what you mean. It's not about querying, it's about adding categories to pages and that sort of stuff :P
http://minecraft-es.gamepedia.com/api.php?action=query&meta=siteinfo&siprop=namespaces
https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces
result['query']['namespaces']['14']['*'] = 'Categor\u00eda'. Congratulations, you now have the localised namespace :P That's about the best you can possibly get from the API. Unless you wanted a /little/ bit deeper, and possibly query the site messages?
I suppose that would work...
#get_language
for the default language of a wiki (would returnen
on our wiki, would returnes
on the Spanish Minecraft Wiki, etc).butt.get_localized_namespace("Category", "pt-br")
=>"Categoria"
.