| Vorlagenprogrammierung | Diskussionen | Lua | Test | Unterseiten | |||
| Modul | Deutsch | English | Modul: | Dokumentation | |||
ISO15924 – script system according to ISO 15924 and usage in text.
1 – language code according to ISO 639Latn1 – script code according to ISO 159242 – text1 – script code according to ISO 159242 – (optional) proprietary additional informationlang – (optional) language code for result, default: language of hosting wiki, otherwise English1 – text
Ω → GrekU+03A9 → Grek1 – text2020-03-101 – Minimum version or wikidata or ~{{#invoke:ISO15924|failsafe}} yields 2020-03-10{{#invoke:ISO15924|failsafe|2001-01-01}} returns: »2020-03-10«{{#invoke:ISO15924|failsafe|2099-01-01}} returns: »« – (empty), if minimal version condition not matchedwikidata, result is version ID registered on Wikidata (2020-03-10) or local if not found there.~, result is empty if local and Wikidata version are the same: ().~ and local version is synchronized.wikidata, or local if not found there, or not synchronized.A test page illustrates results on input values.
Survey tables for wikitext pages.
All functions described above can be used by other modules:
local lucky, ISO15924 = pcall( require, "Module:ISO15924" )
if type( ISO15924 ) == "table" then
ISO15924 = ISO15924.ISO15924()
else
-- In the event of errors, ISO15924 is an error message.
return "<span class=\"error\">" .. ISO15924 .. "</span>"
end
Subsequently there are available:
ask – language code according to ISO 639Latnassume – script code according to ISO 15924analyse – text as string or codepoint or table of single charactersanalyseassigned – script code according to ISO 15924alien – (optional) proprietary additional informationadd – (optional) language code for result, default: language of hosting wiki, otherwise Englishanalyse – text as string or codepoint or table of single charactersanalyse – text as string or codepoint or table of single charactersassume – script code according to ISO 15924analyse – text as string or codepoint or table of single characterswikidata or ~ for synchronisationfalseThe global data will be converted each into Lua table, which is available by mw.loadData() once per rendered page.
There are two access modes:
Data structure:
cjk – boolean, if CJKiso639script – sequence table with any number of string items – script systems usually matching this languagertl – boolean, if right to lefttrans – sequence table with any number of string items – transcription systems dedicated to script or languageunicodes – sequence table with Unicode ranges applicable for a script system (table of two numbers as codepoints)reverse – sequence table with two numbers as codepoints and table with any number of string items – script systemsfailsafe – string with version IDlast – boolean, true if static Lua code updated with WikidataInternal – functions for generation of derived data and maintainance etc.
.cjk.iso639script.rtl.trans.unicodes.reverseThese data is available by central access and maintenance to all Wikis.
By Module:ISO15924/config the local project may be configured optionally.
Returns table with components:
true – Use commons → commons:Data:{ namePat = "lang-%s" }{ namePat = "%sS" }Follow the steps:
Module:ISO15924 into your project.
ISO15924./commons is chosen, in project configuration live switch is needed.
/translate needs to be copied and extended to local language.
/pages are needed for linking with articles./table is necessary.General library; no limitations.
No other than internal sub modules.