Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 1:
Zeile 1:
− +
Zeile 40:
Zeile 40:
− +
+
Zeile 47:
Zeile 48:
− +
+
Zeile 1.172:
Zeile 1.174:
− +
− +
− +
− +
− +
Zeile 1.223:
Zeile 1.225:
+
Modul:Multilingual (Quelltext anzeigen)
Version vom 16. Dezember 2019, 23:46 Uhr
, 23:46, 16. Dez. 20192019-12-14
local Multilingual = { suite = "Multilingual",
local Multilingual = { suite = "Multilingual",
serial = "2019-12-07",
serial = "2019-12-14",
item = 47541920,
item = 47541920,
globals = { ISO15924 = 71584769,
globals = { ISO15924 = 71584769,
Multilingual.exotic = { simple = true,
Multilingual.exotic = { simple = true,
no = true }
no = true }
Multilingual.prefer = { de = true,
Multilingual.prefer = { cs = true,
de = true,
en = true,
en = true,
es = true,
es = true,
nl = true,
nl = true,
pt = true,
pt = true,
ru = true }
ru = true,
sv = true }
Multilingual.tabData = function ( access, alert, alt, frame )
Multilingual.tabData = function ( access, at, alt, frame )
-- Retrieve translated keyword from commons:Data:****.tab
-- Retrieve translated keyword from commons:Data:****.tab
-- Precondition:
-- Precondition:
-- access -- string, with page identification on Commons
-- access -- string, with page identification on Commons
-- alert -- string, with error keyword
-- at -- string, with keyword
-- alt -- string|nil|false, with fallback text
-- alt -- string|nil|false, with fallback text
-- frame -- frame, if available
-- frame -- frame, if available
-- Returns
-- Returns
-- 1. string|nil|false, with selected message
-- 1. string|nil|false, with selected message
-- 2. string|nil|false, with language code, or "error"
-- 2. language code, or "error"
local data = fetchData( access )
local data = fetchData( access )
local r1, r2
local r1, r2
if type( data ) == "table" then
if type( data ) == "table" then
if type( alert ) == "string" then
if type( at ) == "string" then
local seek = mw.text.trim( alert )
local seek = mw.text.trim( at )
if seek == "" then
if seek == "" then
r1 = "EMPTY Multilingual.tabData key"
r1 = "EMPTY Multilingual.tabData key"
elseif data then
elseif data then
r1, r2 = Multilingual.i18n( data, alt, frame )
r1, r2 = Multilingual.i18n( data, alt, frame )
r2 = r2 or "error"
end
end
return r1, r2
return r1, r2