ઢાંચો:માથું/દસ્તાવેજીકરણ

વિકિકોશમાંથી
Jump to navigation Jump to search

This template is used to create a basic headword line. This is the line of text that comes between the part-of-speech header (like ===Noun===) and the actual definitions of the word. This template uses Module:માથુંશબ્દ/ઢાંચાઓ as its back-end.

Note that most invocations of {{માથું}} should be fairly simple. If a language requires a relatively complex call to {{માથું}} for many words (such as the same set of inflected forms in many entries, or using sort= in every entry), the language should probably have its own templates. Templates made specifically for a given language can be more sophisticated, and can handle inflections and other grammatical issues that are specific to that language. They can also make use of the capabilities of Lua modules. For this reason, keep in mind that the usage examples given on this page are for illustrative purposes only. Most of the languages given in the examples here already have their own set of templates, such as {{en-ક્રિયાપદ}}, {{ja-નામ}}, {{zh-નામ}}, {{la-ક્રિયાપદ}} and so on.

However, {{માથું}} can be used for words for which the basic usage (two or three parameters) is enough, or for languages that do not yet have their own templates. If you know how to make your own templates, it's recommended that you create some for the language you intend to work in before creating new entries, rather than using this template (and then having to replace it with a language-specific template later).

Usage[ફેરફાર કરો]

The basic usage is:

{{માથું|(ભાષા)|(part of speech)}}

The first parameter is the language code (see વિક્શનરી:ભાષાઓ), which is required in all cases. The second is the part of speech. For example on {{van}}:

{{માથું|nl|preposition}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

The part of speech is used to add a category to the page. So, the above code would also add the page to શ્રેણી:Dutch prepositions. The part of speech can be left out entirely; no category will be added then. This is discouraged, however, as it is generally assumed that the headword-line template will add a part-of-speech category in most entries.

Script code[ફેરફાર કરો]

The optional parameter લિપિ= gives the script code (see વિક્શનરી:લિપિઓ). The script can usually be detected automatically based on the possibilities listed for the language in Module:ભાષાઓ, so this parameter is only needed in rare cases. The example below is thus only for illustrative purposes; a real example would not need લિપિ= here.

An example, for the entry море, one might use:

{{માથું|sh|નામ|લિપિ=Cyrl|લિંગ=n}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

Displayed headword[ફેરફાર કરો]

Normally, the displayed headword is the same as the name of the current page. The parameter head= can be used to specify a different headword to display. This can be useful if additional accent marks should be placed on the word, that are not present in the normal written form that is given in the page's name. For example, the Latin word scribo is normally written that way, but is also spelled scrībō in its fully accented form. For such a case, you would specify માથું=scrībō.

Another purpose of this parameter is for terms that consist of multiple words. The માથું= parameter can be used to link to the individual words that the term is made up of. For example, for the English phrasal verb give up, you could use:

{{માથું|en|ક્રિયાપદ|માથું=[[give]] [[up]]}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

Note in the above example that the template automatically adds the correct language section to the links in the same way as {{}}. So the links actually come out as if written [[give#અંગ્રેજી|give]] [[up#અંગ્રેજી|up]]. This means that you should not add such section links yourself, nor should you use {{}} inside the માથું= parameter. These were necessary in the past, but they can now be safely removed.

In a few cases it may be necessary to show more than one headword. For example, a language like Russian might have a word with a single written form, but multiple alternative ways of placing the accent marks (compare this to English kílometer and kilómeter). Additional headwords can be displayed using the parameters માથું2=, માથું3= and so on.

Transliteration[ફેરફાર કરો]

If a term is written in a script other than the Latin alphabet, a transliteration of the term into the Latin alphabet should be provided using the લિપ્ય= parameter. Every language generally has its own rules for writing transliterations on Wiktionary; check with the language's "About" page (such as Wiktionary:About Russian) for more information.

The template can automatically transliterate words in many languages; this is controlled through special transliteration modules such as Module:el-લિપ્યંતરણ (and also the data in Module:ભાષાઓ). This means that for those languages, a transliteration does not need to be provided, as it can be generated internally. If the માથું= parameter was provided, it is used as the base for the transliteration instead, so that any additional accents are also included in the transliteration.

Gender and number[ફેરફાર કરો]

The template has a set of parameters to display gender, number, noun class or other kinds of grammatical property. These are used and displayed in the standard format required by Module:લિંગ અને વચન.

The gender is given with the optional લિંગ= parameter. If more than one specification is necessary, you can also use લિંગ2=, લિંગ3= and so on. If you know that a gender is needed, but don't know what it is, specify લિંગ=?, which will add the page to a cleanup category. You can also specify a partial gender. For example, if you know that a word is plural but don't know if it's, say, masculine or feminine plural, you can specify લિંગ=?-બહુ.

Inflections[ફેરફાર કરો]

Further optional parameters are available to display inflections or other closely related forms of the word. These are given pair-wise: the first of each pair gives a label for the inflection, and the second then gives the actual term.

For example, in the Sandbox:

{{માથું|en|નામ|બહુવચન|Sandboxes|અનિયમિત બહુવચન|Sandboxen}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

Certain diacritics are automatically removed from the term when creating the link, just like {{}} and {{શબ્દ}} do. So you don't need to worry about removing them yourself. A Latin example, where macrons are removed automatically:

{{માથું|la|નામ|લિંગ=પુ|genitive|nīdī}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

If you want to display multiple alternative forms of an inflection, you can use or as the label separating them. The template will recognise this and omit the comma:

{{માથું|en|નામ|બહુવચન|lemmas|કે|lemmata}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

The term (second part of a pair) may be blank. This can be used to add a simple note, such as "uncountable" or "intransitive":

{{માથું|en|નામ|countable and uncountable||બહુવચન|milks}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

If the label is blank, but the term is not, it acts as if the term was not specified either and omits both. This is not very useful in entries, but it can be a very powerful feature when writing templates using {{માથું}} as a base.

You can specify alternative display form, script, sense id and gender for each form with the parameters fNalt=, fNsc=, fNid= and fNg=, with "N" replaced with the number of the form. Some examples:

{{માથું|sh|નામ|માથું=tȇlo|લિંગ=ન|સિરિલી જોડણી|те̑ло|f1sc=Cyrl}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).
{{માથું|de|નામ|લિંગ=પુ|genitive|Hundes|કે|Hunds|બહુવચન|Hunde|લઘુતાવાચક|Hündchen|f4g=ન}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).
{{માથું|ja|નામ|uncountable||હીરાગાના|せいじ|ગુજાજી|સેઈજી|f3sc=Latn}}
Lua error in વિભાગ:ઉપયોગીતા at line 6: attempt to index a nil value.
{{માથું|zh|નામ|traditional and simplified||પીનયીન|zhèngzhì|f2sc=Latn}}
Lua error in વિભાગ:માથુંશબ્દ/ઢાંચા at line 15: The language code "zh" is not valid..

When using {{માથું}} as a base to create other templates, the class for accelerated links (WT:ACCEL) can be added with fNaccel=. See Module:માથુંશબ્દ for more information on how to use this. If the label is કે, the corresponding acceleration is ignored, and it is "inherited" from the preceding form. Examples:

{{માથું|ca|નામ|લિંગ=પુ|બહુવચન|f1accel=plural-form-of|homes|કે|hòmens}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

An inflection term can contain wikilinks as part of the parameter, like the માથું= parameter as well as the {{}} template. Language sections will be added to the individual links:

{{માથું|en|વિશેષણ|તુલનાવાચક|[[more]] broken|શ્રેષ્ઠતાવાચક|[[most]] broken}}
Lua error in વિભાગ:લિપિના_ઉપયોગીતા at line 31: attempt to call method 'getCode' (a nil value).

Naturally, you should only use this to display a single form that consists of multiple words. You should not use this to specify multiple alternative forms; use the કે label for this instead.

Categories[ફેરફાર કરો]

There are a few more parameters available for categories:

Notes[ફેરફાર કરો]

This template should chiefly be used when there is no language specific template. With 7000+ languages to be included in the English Wiktionary, most will never have specific templates.

  • Simple forms like {{માથું|en}} or {{માથું|it|નામ|લિંગ=સ્ત્રી}} work as expected.
  • When a template is created for a language, it is an easy task for a bot to replace head with the language-specific template.
    For example, it is trivial to replace {{માથું|en|નામ|બહુવચન|foo}} with {{en-નામ|બહુ=foo}}, a more sophisticated bot will recognize the regular forms.
  • A bot doesn't have to try to parse the language and POS headings.
  • This template makes it much simpler for a bot to generate entries for the inflected form if desired. It has the language code and the POS to use.
  • It uses the existing categories as available. If new POS categories are added, they will be used. (modulo some job-queue magic and such)
  • It automatically wikilinks its parameters if not already.