On 1/20/2008 5:11 AM, Platonides wrote: > 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). >
Can someone on this list confirm whether the action=raw method of the index.php API is supposed to support the variant parameter or not? If not then we have to either do the transcoding client-side or use the rendered HTML instead of the raw wiki markup. Both of these options don't sound very good. Thanks, Jan _______________________________________________ Mediawiki-api mailing list [email protected] http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
