Mòdul:MLMT age 1/ús

De la Viquipèdia, l'enciclopèdia lliure

First example for Module:Multilang module tools. This example is of no real use, it is for educational purposes only.

Link to this module:

Also you can look Module:MLMT age 2.

Similar to the next example, but without grouping arguments and without introduction message.

Examples[modifica]

main[modifica]

{{#invoke:MLMT age 1|main|1957|2001}} -> 44 anys

{{#invoke:MLMT age 1|main|1957}} -> 67 anys

{{#invoke:MLMT age 1|main|any_naix=1957}} -> Error de Lua: El nom de paràmetre "any_naix" no és vàlid.

{{#invoke:MLMT age 1|main|mort=2013|any_naix=1957}} -> Error de Lua: El nom de paràmetre "mort" no és vàlid.

{{#invoke:MLMT age 1|main|any_mort=2000}} -> Error de Lua: "any_naix/birth_year/1" = No té un valor assignat.

main1[modifica]

{{#invoke:MLMT age 1|main1|2001|1957}} -> Error de Lua: Any de la mort després de l'any de naixement.

{{#invoke:MLMT age 1|main1|2057}} -> Error de Lua: Any de naixement després de l'any en curs.

main2[modifica]

{{#invoke:MLMT age 1|main2|2001|1957}} -> Error de Lua: "any_mort/death_year/2" = 1.957 és menor de 2.001.

{{#invoke:MLMT age 1|main2|2057}} -> Error de Lua: "any_naix/birth_year/1" = 2.057 és major de 2.024.

Lists[modifica]

{{#invoke:MLMT age 1|main|allitems=params}}

KeyDefault namesLocalized names (i18n)T.
birth_yearbirth_year, 1any_naixi+-R
death_yeardeath_year, 2any_morti+

You can change the localizated text in: Module:MLMT age 1/i18nUsed argument types: i+ (positive integer). "-R" indicates required arguments.


{{#invoke:MLMT age 1|main|allitems=template}}


<templatedata>
{
"params": {
"any_naix": {
"aliases": [
"birth_year",
["1"]
],
"type": "number",
"required": true
},
"any_mort": {
"aliases": [
"death_year",
["2"]
],
"type": "number"
}
},
"format": "block"
}
</templatedata>


{{#invoke:MLMT age 1|main|allitems=labels}}

KeySourceLocalization (i18n)
yearsyearsanys

You can change the localizated text in: Module:MLMT age 1/i18n


{{#invoke:MLMT age 1|main|allitems=errors}}

KeySourceTranslation
birth_after_todayBirth year after current yearAny de naixement després de l'any en curs
death_after_todayDeath year after birth yearAny de la mort després de l'any de naixement

You can change the localizated text in: Module:MLMT age 1/i18n