Module:TranslationData
From the only original and legitimate Battlestar Wiki: the free-as-in-beer, non-corporate, open-content encyclopedia, analytical reference, and episode guide on all things Battlestar Galactica. Accept neither subpar substitutes nor subpar clones.
More actions
Documentation for this module may be created at Module:TranslationData/doc
local p = {}
p.messages = {
en = {
header = "Machine Translation",
body = "This page began as a machine translation from English. Please help us make it more natural!",
project = "Translation Project"
},
de = {
header = "Maschinelle Übersetzung",
body = "Diese Seite wurde ursprünglich maschinell aus dem Englischen übersetzt. Bitte hilf uns, sie natürlicher zu gestalten!",
project = "Übersetzungsprojekt"
},
fr = {
header = "Traduction Automatique",
body = "Cette page est issue d'une traduction automatique de l'anglais. Merci de nous aider à la rendre plus naturelle !",
project = "Projet de traduction"
},
zh = {
header = "机器翻译",
body = "本页面最初由英文机器翻译而成。请帮助我们完善语言,使其更加自然!",
project = "翻译项目"
}
-- Add more languages here following the same pattern
}
function p.getMessage(frame)
local lang = frame.args.lang or "en"
local key = frame.args.key
-- Fallback to English if the language or key isn't found
local text = (p.messages[lang] and p.messages[lang][key]) or p.messages["en"][key]
return text
end
return p