Module:User:Jberkel/script utilities/documentation

This module provides access to Module:scripts from templates, so that they can make use of the information stored there. It also provides a number of functions that can be used by other modules.

lang_t
This is used by to wrap portions of text in a language tag. See there for more information.

tag_text
Wraps the given text in HTML tags with appropriate CSS classes (see WT:CSS) for the language and script. This is required for all non-English text on Wiktionary.

The actual tags and CSS classes that are added are determined by the  parameter. It can be one of the following:
 * lua
 * The text is wrapped in html.


 * lua
 * The text is wrapped in html.


 * lua
 * The text is wrapped in html.


 * lua
 * The text is wrapped in html.


 * lua
 * The text is wrapped in html.

The optional  parameter can be used to specify an additional CSS class to be added to the tag.

request_script
Generates a request to provide a term in its native script, if it is missing. This is used by the template as well as by the functions in Module:links.

The function will add entries to one of the subcategories of Category:Terms needing native script by language, and do several checks on the given language and script. In particular:
 * If the script was given, a subcategory named "needing (script) script" is added, but only if the language has more than one script. Otherwise, the main "needing native script" category is used.
 * Nothing is added at all if the language has no scripts other than Latin and its varieties.

template_rfscript
This is used by. See there for more information.