Jan Hecking wrote: > To follow up on this somewhat old thread: I finally got around to > actually testing Paolo's suggestion of using the index.php API instead > of api.php. Turns out it doesn't actually work. While the index.php API > does have a variant parameter that allows to select one of the Chinese > language variants (e.g. zh, zh-hk, zh-tw) it does not actually honor > this parameter when combined with action=raw. When returning the raw > Wiki markup it always returns the same variant (zh?) no matter what > variant is specified. > > $ curl -s > "http://zh.wikipedia.org/w/index.php?title=%E8%A5%BF%E6%81%A9%E5%A1%94&action=raw&variant=zh-cn" > > > zh-cn > $ curl -s > "http://zh.wikipedia.org/w/index.php?title=%E8%A5%BF%E6%81%A9%E5%A1%94&action=raw&variant=zh-tw" > > > zh-tw > $ diff zh-cn zh-tw > > diff shows that the markup returned is identical. With action=view (the > default) the output is clearly different. > > So it looks like there is actually no way to get the raw markup in > different language variants? > > Thanks, > Jan
I think it's due there's only one raw markup. The variant is chosen later for display. So you should locally perform that work (you'll need some Mediawiki: messages). _______________________________________________ Mediawiki-api mailing list [email protected] http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
