| Vorlagenprogrammierung | Diskussionen | Lua | Test | Unterseiten | |||
| Modul | Deutsch | English
|
Modul: | Dokumentation | |||
Sort – module with auxilary functions to create sortable keys.
#invoke the first parameter of surrounding template transclusion will be used.#invoke specify input and result format and further capabilities.Return value is always the sort key.
Alphanumeric terms in latin based scripts are reduced to basic characters of ASCII set.
DIN5007m2 (DIN 5007 Variante 2)Casing (upcased/downcased) will remain; that can be eliminated easily from result.
The value is 1 if the first string is lexical less than second string else empty.
Version management
The Failsafe interface is heading for version management of globally distributed Lua modules. It enables modules equipped with this interface to
The Failsafe interface is present both at template level and for direct Lua access.
The functions in detail are (not all supported yet completely by every library):
| Value | Result | current |
|---|---|---|
nothingfalse
|
local version ID | »2024-06-14« |
| Minimal version | version ID required at least date in ISO format It will be compared whether the current local implementation matches this version or later.
|
|
wikidata
|
version ID of global upstream
|
»2024-06-14« |
item
|
ID of the Wikidata item
|
Q24205172
|
~
|
Corresponding version ID locally and registered at Wikidata
|
»« |
@
|
Is the current (module) page linked correctly with Wikidata item?
|
|
The return value is in template programming empty or under Lua false, otherwis a non-empty string as described.
| ||
A test page illustrates results on input formats.
That is implemented by the module DateTime.
All functions described above can be used by other modules:
local lucky, Sort = pcall( require, "Module:Sort" )
if type( Sort ) == "table" then
Sort = Sort()
else
-- In the event of errors, Sort is an error message.
return "<span class='error'>" .. Sort .. "</span>"
end
"latin""cyrillic""greek""uni"latin available only"DIN5007m2"wikidata or ~ for synchronisationfalseUntil 2023 Sort = Sort.Sort() has been recommended for initialization.
Follow the steps:
Module:Sort into your project.
Sort.Module:Sort/local, if present, permits local configuration.
#time: – formatting one particular dayj M YGeneral library; no limitations.
No other than sub modules.
Not necessary.
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.