Hi, I would like to change
local data = loadData(dataset) to
local data = loadData(dataset, frame.args.lang) in the doc function.
The reason being, I would like to be able to do:
This would allow that the TemplateData content is displayed in the language set by the user, and not by the Wikipedia language version. Currently, if a user on the German Wikipedia has set his preferred language to English, the UI as well as the TemplateData captions and so on are in English, but the the data coming from the translation dataset is in German.
I tried to use the Scribunto/Lua equivalent of
mw.message.new("lang"):plain(), but strangely this also returns the Wikipedia content language and not the user language.
I'm specifically asking to be on the safe side as you specifically put a TODO above the line I want to change.