(This template should be used on pages in theCategory: namespace.)
| Note | |
|---|---|
All categories should now be handled by{{auto cat}}. SeeModule:category tree/data/documentation for more information, and for specifics regarding the category tree. |
This template is used on category pages to automatically add acategory boilerplate template. It deciphers the category name and transcludes the correct template with the correct parameters.
No parameters are needed in most cases. A few categories have optional or required parameters to help out the categorization.
Most categories have an "Edit category data" button in the upper right that takes you directly to the module that implements the category.
To more easily add this template, placeimportScript('User:Erutuon/addAutoCat.js'); in yourcommon.js. This will add buttons directly below the first heading. Click them to add the template and save, or add the template and preview.
Some categories allow or require parameters to{{auto cat}} to help out categorization.
These are categories are categories such asCategory:Latin terms suffixed with -inus andCategory:Japanese terms prefixed with 真っ. The types of affixes currently recognized areprefix,suffix,infix,interfix,circumfix andtransfix. For these categories, the following parameters are allowed (none are required):
|alt={{auto cat|alt=-īnus}} so that the suffix in the category description, and the breadcrumb at the top of the page, are displayed as-īnus, with a macron.|sort={{auto cat|sort=まっ}} so that the page is properly sorted in its parent categoryCategory:Japanese terms by prefix.|tr=|sc=These are categories such asCategory:French language andCategory:Proto-Indo-European language. These are the root categories for the various languages represented in Wiktionary. These categories haverequired parameters specifying the country or countries where the language is spoken, as well as additional optional parameters:
|1=,|2=,|3=, ...Languages oflocation as its parent(s). SeeCategory:Languages by country and its subcategories. Make sure to include the wordthe if warranted, e.g.the Philippines orthe United States. At least one location isrequired unless the language is reconstructed (e.g.Proto-Indo-European) or constructed/artificial (e.g.Esperanto). If the location is truly unknown, use the valueUNKNOWN. If a country subdivision is specified and the correspondingLanguages oflocation category is defined and specifies a parent in its{{auto cat}} call, that parent will automatically be used as an additional location. For example,Category:Tlamacazapa Nahuatl language specifies{{auto cat|Guerrero, Mexico}}, which adds the category toCategory:Languages of Guerrero, Mexico; but since this category's definition is{{auto cat|parent=Mexico}},Category:Tlamacazapa Nahuatl language automatically gets added toCategory:Languages of Mexico as well.|extinct=1|setwiki=French language). Specify|setwiki=- to show no Wikipedia article link. Preferably, the wikidata entry for the language should be added to the language's data file rather than specified manually in this template.|setwikt=|setwikt=- to show no Wiktionary edition link.|setsister=French language). Specify|setsister=- to show no Commons category link.|entryname=French). Specify|entryname=- to show no entry link.These are categories that refer to regional, temporal and sociolectal varieties of languages such asCategory:Latin American Spanish (regional),Category:Early Modern English (temporal) andCategory:Classical Persian (sociolectal), including those that don't have the containing language in their name (e.g.Category:Provençal andCategory:Dari) or have only part of the containing language in their name (e.g.Category:Walser German, which is a variety of theAlemannic German language and not a variety ofGerman). Because of the diversity of naming conventions,{{auto cat}} won't recognize or process such categories unless|lect=1 is given. The handler in{{auto cat}} that handles such categories will attempt to infer the relevant properties of the lect in various ways:
parent field, the relevant fields of the label definition will be used to establish the lect's properties.This is now the preferred method of specifying a lect's properties, because it centralizes all information about the lect in the language-specific label modules. As an example, consider the categoryCategory:Javanese Indonesian. The Indonesian label data moduleModule:labels/data/lang/id defines a labelJava that has the settingregional_categories = "Javanese" (causing that label to categorize intoCategory:Javanese Indonesian) and also has a settingparent = "Indonesia" (indicating that the label is a lect whose parent lect is defined by theIndonesia label). As a result of theparent setting, the properties of theJava label will be taken from the fields specified for this label, such asprep = "on" andregion = "the island of [[Java]]", which together cause the description of the category to readTerms or senses in Indonesian as spoken on the island ofJava. (See below for fields likeprep andregion.) The value of theparent field,Indonesia, will cause the category associated with that label (Category:Indonesian Indonesian) to be the parent category ofCategory:Javanese Indonesian. Top-level lects should useparent = true, which puts them directly under e.g.Category:Regional Indonesian (unlessnoreg = true is also given, in which case they go under the higher-level categoryCategory:Varieties of Indonesian; non-regional lects such asCategory:Classical Indonesian andCategory:Prokem Indonesian should use this).NOTE: The value of theparent field is alabel, not a category. Labels and categories do not have to match exactly in name (cf. the labelJava vs. the corresponding categoryCategory:Javanese Indonesian, and the labelIndonesia vs. the corresponding categoryCategory:Indonesian Indonesian). However, if they do not match, the connection between them should still be clear.{{auto cat}}. Generally, the same recognized parameters to{{auto cat}} (described below) have the same names and semantics as the fields in label definitions that control lect properties.In the above list, properties specified lower down override those specified higher-up. In other words, default properties inferred from the name itself are overridden by properties derived from a lect label that categorizes into the category in question, which are in turn overridden by properties directly specified by{{auto cat}} parameters.
The following parameters are recognized to{{auto cat}}, which are listed along with the corresponding fields in the lect label definition:
{{auto cat}} param | Lect label field | Definition |
|---|---|---|
|lect=1 | parent = | |lect=1 must be specified for{{auto cat}} to process the category, andparent = must be given for a label to be treated as a lect label (along with the fact that the label must categorize into the category in question). The value ofparent is either the containing lect label (not the category name) ortrue if the lect is a top-level lect (its parent will beCategory:Regional LANG whereLANG is the L2 language in question, orCategory:Varieties of LANG if the fieldnoreg = true is set). |
|1= | region = | English description of the location where the lect is spoken (for regional lects), the time period where the lect was spoken (for temporal lects) or thelinguistic register of the lect (for sociolects). The text normally appears after the words "Terms or senses in LANGUAGE as spoken in", although both the verb ("spoken") and the preposition ("in") can be customized. Normally, the description will be linked using{{l|en}}; use|nolink=1 to disable this (see below). If the description names a country (or in some cases a sub-country entity such as California), and a category namedLanguages ofcountry exists, the lect will automatically be categorized into this category. You can override the country or countries of the lect using|country=. If omitted, the default description is inferred from the lect name by subtracting the containing language (see|cat= and|lang= below). For example, forCategory:Texas German, the containing language will be inferred as 'German', and after subtracting this, the default description becomesTexas. In some cases, this will be wrong, especially if the location is named in the lect using the adjectival form of the location, and the description must be given explicitly. For example,Category:Puerto Rican Spanish will result in a default descriptionPuerto Rican when it should bePuerto Rico. If it's not possible to match the containing language in the lect name,|1= must be specified or an error results (unless|def= or|fulldef= are given; see below).
|
|cat= | parent = | The parent category. This is the first containing category listed at the bottom of the page and determines the trail ofbreadcrumbs displayed at the top of the page. This should be used to express containment relationships of regional and temporal lects. For example,Category:Durham University English hasCategory:Durham English as its parent, which in turn hasCategory:Northumbrian English as its parent, which in turn hasCategory:Northern England English as its parent, etc. For lect labels, the parent category is the regional or plain category that the parent label categorizes into. If the parent category is omitted, the default depends on the containing language, according to the following algorithm:
|
|lang= | (no equivalent) | Override the containing language. See|cat= above for more details. The containing language determines the default parent category (see above) and the default breadcrumb (see below). Note that if the lect directly names an etymology-only language,|lang= will automatically be inferred to be that language, and the corresponding language code(s) will be shown as part of the "additional" text following the category description. There is no equivalent because the containing language is taken from whatever language-specific label module the lect label was found in. Note that this does not have to match the name of the category. For example, all Chinese-related lect labels are centralized inModule:labels/data/lang/zh, meaning that a category likeCategory:Beijing Mandarin will have its lect label definition inModule:labels/data/lang/zh, not inModule:labels/data/lang/cmn (corresponding to theCategory:Mandarin language), and this will not cause a problem. |
|breadcrumb= | breadcrumb = | Override the default breadcrumb displayed for the lect in the trail of breadcrumbs displayed at the top of the page. The default breadcrumb is normally the portion of the lect's name minus the containing language suffix. For example,Category:Southern Brazilian Portuguese has containing language 'Brazilian Portuguese' and hence will have default breadcrumbSouthern. If the containing language cannot be matched in the lect's name, the code will try matching any parent languages of the containing language. For example,Category:Bahian Portuguese is a sublect of Brazilian Portuguese; if|lang=pt-BR is given to set the containing language appropriately, the name 'Brazilian Portuguese' is not a suffix of 'Bahian Portuguese', but its parent language Portuguese is, so the default breadcrumb will beBahian. If neither the containing language nor any parent language matches, the breadcrumb is based on the entire lect (e.g. for lects likeCategory:Provençal). |
|noreg=1 | noreg = true | Indicate that this lect is not a regional lect. This is only necessary when|cat= isn't explicitly given to{{auto cat}} (or equivalently,parent = true is given in the lect label definition), as its only purpose is to control the default parent category. See|cat= andparent = for more information. |
|nolink=1 | nolink = true | Don't automatically link the description in|1= using{{l|en}}. This should be specified if|1= contains a description such asfrom the 15th to the 18th centuries that is not a Wiktionary entry, and does not have any links in it (either bare or specified using{{l}},{{w}} or the like). (If the value of|1= has bare links in it, the effect of wrapping with{{l|en}} is simply to convert those bare links into links pointing to the English section of the page in question, which is generally correct.) |
|verb= | verb = | Override the verb "spoken" that normally appears in the category's description. Example values areformerly spoken for an extinct lect;chiefly spoken for a lect mostly spoken in the location specified in|1= but also spoken elsewhere;written for a written-only lect; etc. |
|prep= | prep = | Override the preposition "in" that normally appears in the category's description. Example values areon if the location in|1= is an island;by if|1= specifies a group of people speaking the language (e.g.Tamil Brahmins); etc. Use- to suppress the preposition (e.g.Category:Overseas Chinese sets|1=outside of [[China]] and [[Taiwan]] and|prep=-). |
|def= | def = | Override the whole description following the words "Terms or senses in". The final period should not be included. |
|fulldef= | fulldef = | Override the entire description. The final period should not be included. |
|addl= | addl = | Specify additional text to display after the "Terms or senses in ..." category description, and before any category TOC (table of contents) bar. If this is given, include the final period. Note that if the lect directly names an etymology-only language, the additional text will automatically include the language code(s) of this etymology-only language. In such a case, any text specified using|addl= will follow this auto-added text. |
|othercat= | othercat = | Any additional category or categories to place the lect in. Separate multiple categories with a comma, without a following space (if a space follows the comma, it will not be considered a delimiter; this allows for embedded commas in categories, which are nearly always followed by a space). Unlike the value in|cat=, there are no restrictions on what sort of categories can be specified here. |
|country= | country = | Override the country or countries where the lect is spoken. See|1= above. Separate multiple countries with a comma without a following space, as with|othercat=. The purpose of this parameter is to add the lect to additional categories namedLanguages ofcountry, so that such categories will be populated with all lects spoken in the country. If theLanguages ofcountry category does not already exist, the lect will not be added to it. As mentioned in|1= above, if|1= names a country and a correspondingLanguages ofcountry category exists, the lect will automatically be added to it, so|country= does not need to be specified. As a rule, do not specify|country= for sub-country lects. For example,Category:Texas English should not have|country=the United States specified, sinceCategory:Texas English is a subcategory ofCategory:American English, which is inCategory:Languages of the United States. An exception is when a language is spoken in only a portion of a country. For example,Category:Texas Silesian should have|country=the United States specified because there is no lect namedCategory:American Silesian (Silesian is not normally spoken in the United States except in Texas). |
|wp= | Wikipedia = | Wikipedia link to include on the lect's page. This can be a single Wikipedia page or a comma-separated list of such pages (without any space after the comma; if a space follows the comma, it will not be considered a delimiter, to allow for embedded commas in Wikipedia page names). A given Wikipedia page can be prefixed with a language code to link to a page in a non-English Wikipedia. For example,Category:Japanese Korean specifies|wp=Zainichi Korean language,ko:재일조선어 to link to theZainichi Korean language page on the English Wikipedia as well as the page재일조선어 on the Korean Wikipedia. If the value of a Wikipedia page is+,1,yes,true,on or similar, the Wikipedia page will be taken from the lect name. Note that if the lect names an etymology-only language (e.g.Category:Provençal orCategory:Brazilian Portuguese), the correct Wikipedia article for this lect will automatically be fetched based on the relevant Wikidata entry and added to the category page. To prevent this, specify an explicit value for|wp=; use-,0,no,false,off or similar if you don't want any Wikipedia page displayed. |
|type= | type = | Specify the type of lect (extinct,extant,reconstructed,unattested orconstructed). Extinct lects are categorized intoCategory:All extinct languages. Reconstructed lects are categorized intoCategory:Reconstructed languages. Unattested lects are categorized intoCategory:Unattested languages. Constructed lects are categorized intoCategory:Constructed languages. In all cases an "additional text" message is placed indicating that the lect is (respectively) extinct, reconstructed, unattested or constructed. If the type is not given, it is inferred based on various factors (the type of the parent category, the type of the language that the lect belongs to, and whether the name of the category or language begins with "Proto-"). If no type can be inferred, it defaults toextant. |
|pagename= | (no equivalent) | Act as if the pagename is the specified value rather than its actual value. Any inferred parameters will be based off of the specified value. This is useful for testing and demonstration purposes (e.g. in documentation pages). |
1. ForCategory:Hong Kong English, use:
{{auto cat|lect=1|cat=Chinese English}}
Here,|1= does not need to be specified because the inferred description "Hong Kong" is correct. The language is automatically inferred as English (and in any case, this is an etymology-only language with codeen-HK, from which the language can be inferred). The parent category is set toCategory:Chinese English in place of the defaultCategory:Regional English.
2. ForCategory:Durham University English, use:
{{auto cat|lect=1|prep=at|{{w|Durham University}} in [[Durham]]|cat=Durham English|othercat=en:Universities}}
Here, we specify the region description in|1= but the language is automatically inferred as English. The parent category is set toCategory:Durham English in place of the defaultCategory:Regional English (which leads to a breadcrumb chainRegional » European » British » English » Northern England » Northumbrian » Durham » Durham University based on parent categories).Category:en:Universities is added as an additional parent category.
3. ForCategory:Limburgan-Ripuarian transitional dialects, you could use:
{{auto cat|lect=1|lang=gmw-cfr|the tri-state region of <country>|cat=Ripuarian Franconian|country=Belgium,the [[Netherlands]],Germany|wp=Southeast Limburgish dialect}}
This is a more complex example. We have to set the language (Central Franconian) explicitly using|lang= because it is not inferrable from the name and the category does not refer to an etymology-only language. The description in|1= contains<country>, which substitutes the countries mentioned in|country= (which also cause the category to be added toCategory:Languages of Belgium,Category:Languages of the Netherlands andCategory:Languages of Germany. We also specify a parent category and Wikipedia page to link to.
However, this is now handled in the preferred way, using properties of the lect label, as follows (as found inModule:labels/data/lang/gmw-cfr):
labels["Limburgan Ripuarian"] = {region = "the tri-state region of <country>",country = "Belgium,the [[Netherlands]],Germany",aliases = {"Tri-state Limburgish", "Limburgan-Ripuarian", "Southeast Limburgish dialect", "Limburgan-Ripuarian Transitional Dialects"},Wikipedia = "Southeast Limburgish dialect",plain_categories = "Limburgan-Ripuarian transitional dialects",parent = "Ripuarian",}4. ForCategory:Dobhashi, use:
{{auto cat|lect=1|lang=bn|def=a literary register of Bengali that was in common use from the 14th century to the 19th century|type=extinct|noreg=1|wp=1}}
Here, we have to set the language (Bengali), and we override the definition after "Terms or senses in" using|def= in place of specifying|1=. Since this isn't a regional lect, we set|noreg=1 so the parent defaults toCategory:Bengali language. We set|type=extinct because this lect is extinct and this cannot be inferred from the parent (which is not extinct). We also use|wp=1 to link toDobhashi on Wikipedia.
5. ForCategory:BMAC substrate, use:
{{auto cat|lect=1|def=the [[substrate]](s) spoken in the {{w|Bactria–Margiana Archaeological Complex}} and possibly found as a {{w|substratum in Vedic Sanskrit}}|breadcrumb=BMAC}}
Here, the language in question is an etymology-only substrate language whose actual name begins with a lowercase letter (the BMAC substrate), but the lect handler automatically takes care of the mismatch and recognizes the etymology-only language. The type is automatically inferred to beunattested based on it being a substrate language (this is done by checking the code; all substrate language codes begin withqsb-). Based on the type, the default parent isSubstrate languages. We set a breadcrumb to override the default breadcrumbThe BMAC substrate.
These are categories such asCategory:Languages of India,Category:Languages of the United States andCategory:Languages of California. These categories contain subcategories for all the languages and sublects spoken in the location in question. The following parameters are allowed (none are required):
|parent=|parent=the United States) for categories of a subdivision of a country (e.g.Category:Languages of California). This causes the first parent of the category to beLanguages ofparent instead of the defaultLanguages by country. Can contain multiple parents, comma-separated with no space after the comma. Custom sort keys can be specified after a colon;+ in the custom sort key stands for thebare location, i.e. the location minus anythe at the beginning. The default sort key for theLanguages by country parent is the bare location, but the default sort key for any parents controlled by the|parent= parameter is an ASCII space character followed by the bare location. For example, the categoryCategory:Languages of the Marshall Islands specifies|parent=the United States, causing its first parent to beCategory:Languages of the United States with a sort key Marshall Islands (i.e. there is a space at the beginning); this sorts all theLanguages of ... categories at the beginning, while categories for individual languages are sorted under the appropriate letter. As a more complex example, the categoryCategory:Languages of the United States Virgin Islands specifies|parent=the United States,the Caribbean:Virgin Islands, US which makes the first parentCategory:Languages of the United States with sort keyUnited States Virgin Islands and the second parentCategory:Languages of the Caribbean with sort keyVirgin Islands, US (without initial space becauseCategory:Languages of the Caribbean mostly only contains otherLanguages of ... categories).|basename=the State of Mexico, Mexico), this specifies thebasename, which is the portion of the location without any containing polity appended (e.g. justthe State of Mexico). This does not usually need to be given, as it is automatically computed by chopping off anything in the location starting with a comma. Normally, thebare basename (the basename minus anythe at the beginning, e.g.State of Mexico orUnited States) is where the entry describing the location is found in Wiktionary, and is used e.g. in the breadcrumb for the category as displayed in the chain of breadcrumbs at the top of the page.|flagfile=File: prefix should be omitted. An example is|flagfile=Flag of Afghanistan (2013–2021).svg for Afghanistan. The default isFlag ofbasename.svg (see the previous parameter); if this file does not exist, no flag is displayed. Use|flagfile=- to cause the flag to be omitted even if the appropriate flag file is present.|wp=|wp=+ or|wp=1 to specify that the name of the Wikipedia article is the same as the category name.|commonscat=|commonscat=+ or|commonscat=1 to specify that the name of the Commons category is the same as the category name.|locationcat=Languages oflocation category. Usually this does not need to be given because the default (thebare location, i.e. location minus initialthe) is correct. It does need to be given if there is a mismatch in the form of the location vs. the bare category; for example,Category:Languages of California needs|locationcat=California, USA because the category for California is namedCategory:California, USA. Can contain multiple categories, comma-separated with no space after the comma.|locationlink=the [[State of Mexico]], [[Mexico]]) for locationthe State of Mexico, Mexico) is correct.These are categories such asCategory:User fr-4 indicating that the user speaks French at near-native competency. The following parameters are allowed (none are required):
|text=File: prefix should be omitted. An example is|text=Ces utilisateurs parlent <<français>> à un niveau '''comparable à la langue maternelle'''. for the translation of "These users speak French at a near-native level." The text describing the level of competency should be boldfaced and the text specifying the language should be surrounded in double angle brackets, as shown. The language in double angle brackets will be boldfaced and linked to the higher-level user-competency category (e.g.Category:User fr); in that category, double angle bracket text is linked to the language category (e.g.Category:French language). If the text is omitted, the category is placed in two cleanup categories:Category:Requests for translations in user-competency categories by language andCategory:Requests for translations in user-competency categories with ##-## users (e.g.Category:Requests for translations in user-competency categories with 16-31 users). (The purpose of the latter categories is to segment the categories with missing text by number of users so that the ones with more users can be focused on first.)|verb=|langname=eml for Emiliano-Romagnol; on Wiktionary, this code is represented by two languages, Emilian with codeegl and Romagnol with codergn). Such categories should be actively eliminated by moving the users in them to the nearest valid Wiktionary code and then deleting the category when empty.These are categories such asCategory:English terms spelled with É,Category:Japanese terms spelled with 愛 andCategory:Ladino terms derived from the Hebrew root ח־ב־ר. Normally, what followsspelled with is a single character, but occasionally multiple characters are used, as inCategory:Ladino terms derived from the Hebrew root ח־ב־ר. For these categories, the following parameters are allowed (none are required):
|sort={{auto cat|sort=I}}, andCategory:Japanese terms spelled with 衛, which should use{{auto cat|sort=行10}}. Japanese and Okinawan terms useModule:Hani-sortkey to generate the sort key, but currently this always generates Chinese sort keys, which in rare cases are wrong for Japanese (for example, the autogenerated sort key forCategory:Japanese terms spelled with 衛 is行09 instead of行10).|char=gershayim, this should be the actual character referred to (in this case,{{auto cat|char=״}}). Otherwise, it should be left out.|context=,|context2=These are categories such asCategory:Japanese terms spelled with 学 read as がく andCategory:Okinawan terms spelled with 光 read as ふぃちゃい. These contain terms spelled with individualkanji read in particular ways (where the reading is written inhiragana). These categories haverequired parameters specifying the type(s) of reading(s):
|1=,|2=,|3=, ... (required)kun,on,goon,kan'on,kan'yōon,tōon,sōon ornanori. For example,Category:Japanese terms spelled with 学 read as がく should use{{auto cat|goon|kan'on}} andCategory:Okinawan terms spelled with 光 read as ふぃちゃい should use{{auto cat|kun}}. The particular reading type(s) can often be found on the page dedicated to the kanji in question.These are categories such asCategory:Japanese terms with 諒 replaced by daiyōji 了. These contain terms spelled with specific uncommonkanji that normally have that character replaced by another homophonic character (adaiyōji) chosen only for the sound and not the meaning. These categories have arequired parameter specifying the sort key:
|sort= (required)These are categories such asCategory:Japanese kanji read as ゐ. These are umbrella categories grouping categories for kanji read with specific readings that have specific origins (e.g.kun,on). These categories have the following optional parameters:
|histconsol=modern