Changes

From Gramps

User:DomoViridi/TempTest/Dict

805 bytes added, 9 March
The Dict template: Updated usage: lang parameter is mandatory; nothing printed if language missing.
Usage:
<nowiki>{{Dict
|lang=nl
|word=sillius soddus
|default=sukkel
|en=silly sod
|nl=sukkel
}}</nowiki>
orLegacy usage with '''default''' parameter for Dutch description:
<nowiki>{{Dict
|lang=en
|word=sillius soddus
|default=sukkel
|en=silly sod
|nl=sukkel
}}</nowiki>
Usage with '''word''' parameter passed as first unnamed parameter:
<nowiki>{{Dict|lang=en|sillius soddus
|en=silly sod
|nl=sukkel
}}</nowiki>
 
Usage where the requested translated text is not yet available (yields no output):
<nowiki>{{Dict|lang=en|sillius soddus
|default=sukkel
}}</nowiki>
 
 
The '''lang''' parameter is mandatory, and must be the country code for the language to be shown. Its value will be used to select the parameter with the description.
 
The '''word''' parameter will be printed as the lemma. Is can also be passed as the first unnamed parameter.
 
The other parameters give the description text for various languages. The name of the parameter must be the country code for the language in which the description is written. For historic reasons, '''default''' is allowed as an alternative for '''nl'''.
This template will construct a description list (a bold lemma, with on the next line an indented description), chosing from the list of descriptions in different lanugages the language of the page that called it.
On an English page (default)
;'''sillius soddus''':silly sod
On a Dutch page
;'''sillius soddus''':sukkel
If the language of the page is not present in the list given in the template call, the lemma is still nothing will be printed. In a list of dictionary entries, but it will be like the description is emptyentry was omitted.
[[Category:Templates]]
</noinclude>
252
edits

Navigation menu