Endrika:categorize
Erreur de script : la fonction « template_categorize » n’existe pas.
- The following documentation is located at Endrika:categorize/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions
This template is a template wrapper around the format_categories
function in Module:utilities/templates. It adds one or more categories to an entry, using the provided language code to generate a sort key specific to the language.
For example, Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). or Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). in the entry cíonn adds the category Category:Munster Irish with the sortkey cionn
, in which the acute accent on cíonn
has been removed.
If the namespace of the current page is not meant to contain entries (it's not the main, Reconstruction, or Appendix namespace), then the template does not categorize, so it's safe to use on any page and in any template.
The two templates Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). and Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). are specialized versions of Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value).. They work the same way, and have the same parameters. However:
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). (shortcut Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value).) will add the language name before all the names that are provided. This creates a grammatical – morphological, orthographical or part-of-speech-related – category whose name is based on the format
Category:(language name) (category name)
. - Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). (shortcut Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value).) will add the language code and a colon
:
before all the names. This creates a topical category, whose name is based on the formatCategory:(language code):(category name)
.
Usage
[Ovay]The template accepts the following parameters:
|1=
- The language code (see Wiktionary:Languages). This is required.
|2=
,|3=
…- One or more categories. There is no limit to how many you can specify. Empty values will be skipped.
|sort=
- Provides a custom sort key. This will override the automatically generated sort key.
|sort1=
,|sort2=
…- Provides a custom sort key only for a specific category.
Examples
[Ovay]- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). adds:
- Category:Cockney rhyming slang
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). adds:
- Category:English nouns
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). adds:
- Category:Portuguese suffixes
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). adds:
- Category:en:Biology
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value). adds:
- Category:pt:Biology
See also
[Ovay]- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value).
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value).
- Erreur Lua dans Module:template_link/data à la ligne 13 : attempt to call local 'deepcopy' (a nil value).
- caps (returns a particular letter, either in upper or lower cases)
- ordinal to word (returns "first" from 1, "second" from 2, etc.)
- navbox (generates a collapsible box)
- !! (returns two vertical pipes: ||)
- (! (returns a left brace followed by a vertical pipe: {|)
- !) (returns a vertical pipe followed by a right brace: |})
- !- (returns a vertical pipe followed by a dash: |-)
Languages, families and scripts:
Categories:
- categorize (adds a category, with language-specific sorting)
- topics (adds a topical category, with language-specific sorting)
- catlangname (adds a lexical or other category similarly named, with language-specific sorting)
Other:
- edit (generates an "edit" button)