Mòdul:Cycling race/lang
Aparença
Podeu crear la pàgina d'ús per documentar aquest mòdul Lua. |
local translations = {}
function translations.list(item)
--[[
Using country items to get the name of a country is very slow. Expand and translate this list to your needs, for example to all Scandinavian items or
South-Amercon items if this is your main topic. The information for rarely used countries is taken from Wikidata. Maybe adding 300+ country names is to much
and it is to much work to insert them all by hand, but 30 or 40 should be OK.
]]
local list = {}
list={ ["Q16"]="Canadà", ["Q17"]="Japó", ["Q20"]="Noruega", ["Q29"]="Espanya", ["Q30"]="Estats Units", ["Q31"]="Bèlgica", ["Q32"]="Luxemburg",
["Q33"]="Finlàndia", ["Q34"]="Suècia", ["Q35"]="Dinamarca", ["Q36"]="Polònia", ["Q37"]="Lituània", ["Q38"]="Itàlia", ["Q39"]="Suïssa",
["Q55"]="Països Baixos", ["Q77"]="Uruguai", ["Q96"]="Mèxic", ["Q142"]="França", ["Q145"]="Regne Unit", ["Q159"]="Rússia",
["Q183"]="Alemanya", ['Q214']='Eslovàquia', ["Q408"]="Austràlia", ["Q414"]="Argentina", ["Q664"]="Nova Zelanda", ["Q717"]="Veneçuela",
["Q739"]="Colòmbia", ["Q29999"]="Països Baixos" }
local value = list[item]
if value ~= nil then return value else return '' end
end
--[[
This is for the data in "official name" - qualifiers in team items. The first element in the list lang_priority has the highest priority.
The code looks first in Wikidata team items if there is a translation in this language. If there is no such translation, the next language is taken.
In case no matching "official name" - qualifier is available, the standard "official name" is printed, that is the one that is the value in that statement.
If a wiki doesn´t have the lang module or this variable is not inserted into the lang module , the "official name" - qualifiers are ignored.
It is used to print non latin team names in the cycling race tables and local team names, for example "Team Sky" instead of "Sky".
]]
--translations.lang_priority = {'ja', 'mk', 'ru'}
return translations