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 26:
Zeile 26:
+
Zeile 45:
Zeile 46:
− ["in"] = "id",
Zeile 763:
Zeile 763:
−
−
−
− Multilingual.getScriptName = function ( assigned, alien, add )
− -- OBSOLETE
− -- Retrieve script name, hopefully linked
− -- Precondition:
− -- assigned -- string, with ISO 15924 script code
− -- alien -- string, with ISO language code, or not
− -- add -- arbitrary additional information
− -- Postcondition:
− -- Returns string
− local bib = fetch( "ISO15924" )
− local r
− if bib and
− type( bib.getScriptName ) == "function" then
− r = bib.getScriptName( assigned, alien, add )
− end
− return r or ""
− end -- Multilingual.getScriptName()
Zeile 1.141:
Zeile 1.121:
− +
+
+
− +
Zeile 1.150:
Zeile 1.132:
− +
Zeile 1.158:
Zeile 1.140:
− +
+
Zeile 1.166:
Zeile 1.149:
− +
− +
Zeile 1.324:
Zeile 1.307:
−
−
−
− p.getScriptName = function ( frame )
− -- OBSOLETE
− -- Retrieve script name from ISO 15924 script code, hopefully linked
− -- 1 -- code
− -- 2 -- optional additional key
− local s1 = mw.text.trim( frame.args[ 1 ] or "????" )
− local s2 = frame.args[ 2 ]
− if s2 then
− s2 = mw.text.trim( s2 )
− end
− return Multilingual.getScriptName( s1, false, s2 )
− end -- p.getScriptName
Zeile 1.467:
Zeile 1.435:
− +
+
Modul:Multilingual (Quelltext anzeigen)
Version vom 12. November 2019, 17:42 Uhr
, 17:42, 12. Nov. 20192019-11-12
local Multilingual = { suite = "Multilingual",
local Multilingual = { suite = "Multilingual",
serial = "2019-11-02",
serial = "2019-11-12",
item = 47541920,
item = 47541920,
globals = { ISO15924 = 71584769,
globals = { ISO15924 = 71584769,
* userLangCode()
* userLangCode()
* wikibase()
* wikibase()
* failsafe()
loadData: Multilingual/config Multilingual/names
loadData: Multilingual/config Multilingual/names
]=]
]=]
ger = "de",
ger = "de",
gr = "el",
gr = "el",
iw = "he",
iw = "he",
jp = "ja",
jp = "ja",
return r
return r
end -- Multilingual.getName()
end -- Multilingual.getName()
-- frame -- frame, if available
-- frame -- frame, if available
-- Postcondition:
-- Postcondition:
-- Returns string with appropriate code
-- Returns
-- 1. string, with selected message
-- 2. string, with language code, or not
local s = type( all )
local s = type( all )
local object, r
local object, r, r2
if s == "table" then
if s == "table" then
object = all
object = all
end
end
if type( object ) == "table" then
if type( object ) == "table" then
if about then
if about and about ~= "labels" then
s = "descriptions"
s = "descriptions"
else
else
if type( object ) == "table" then
if type( object ) == "table" then
if object[ attempt ] then
if object[ attempt ] then
r = object[ attempt ].value
r = object[ attempt ].value
r2 = attempt
else
else
local poly
local poly
end -- for k, v
end -- for k, v
if poly then
if poly then
r = Multilingual.i18n( poly, nil, frame )
r, r2 = Multilingual.i18n( poly, nil, frame )
end
end
end
end
end
end
end
end
return r or ""
return r or "", r2
end -- Multilingual.wikibase()
end -- Multilingual.wikibase()
return r or ""
return r or ""
end -- p.getName
end -- p.getName
-- Optimal translation of wikibase component
-- Optimal translation of wikibase component
-- 1 -- object ID
-- 1 -- object ID
-- 2 -- either "descriptions" or "labels"
-- 2 -- 1 for "descriptions", 0 for "labels".
-- or either "descriptions" or "labels"
local r
local r
local s = mw.text.trim( frame.args[ 1 ] or "" )
local s = mw.text.trim( frame.args[ 1 ] or "" )