साँचा:भाषा विस्तार/doc
इस साँचे का इस्तेमाल कई बड़ी संख्या के पृष्ठों में किया जा रहा है। बड़े पैमाने पर व्यवधान और अनावश्यक सर्वर लोड से बचने के लिए, किसी भी बदलाव के पहले इस साँचे के /प्रयोगपृष्ठ उपपृष्ठ या अपने उपयोगकर्ता स्थान पर उसे जांच कर देख ले। जांचे गये बदलावों को इस साँचे में एक बार में जोड़ा जा सकता है।अन्य उपयोगकर्ताओं के खातिर, बदलाव करने से पहले उससे सम्बंधित बात-चीत वार्ता पृष्ठ पर करें। |
This template is used by the standard installation of Twinkle. If you are planning to make major changes to this template or nominate it for deletion, please notify Twinkle's user base and maintainers at विकिपीडिया वार्ता:Twinkle as a courtesy. |
This template should usually not be placed on article pages directly. Instead, language-specific templates from Category:Expand by language Wikipedia templates are preferred if only one language is linked. |
यह प्रलेखन उपपृष्ठ साँचा:भाषा विस्तार के लिए है। इसमें उपयोग विधि की जानकारी, श्रेणियाँ और वह वस्तुएँ हैं जो कि असली साँचा के पृष्ठ पर नही हैं। |
This template has two purposes: it is primarily used in transclusion from other templates such as {{Expand French}} or {{Expand Spanish}} to mark English Wikipedia articles that can be improved by a translation from a foreign-language Wikipedia. Second, this template may be placed directly on article pages if an article can be improved by translations from multiple foreign-language Wikipedias. Generally, you should use one of the templates in this list whenever possible, rather than this template. If you're not sure if this is the right template to use, it probably isn't.
Creation of a new daughter template
संपादित करेंThe primary use of this template is to create a new wrapper template for a particular language. If you need to create {{Expand Klingon}}, follow these steps. When transcluded, the daughter template creates a "notice"-type {{ambox}} with translation instructions in a hide/show box, and categorizes the page into one or more translation categories, depending on parameter values.
For a list of all daughter templates, see Category:Expand by language Wikipedia templates.
You may start a new, {{Expand <Language-name>}}
template by following these steps:
- Create the page Template:Expand XXXX (where 'XXXX' is the language name):
- using preloaded model; alter 'XXXX' in browser url to actual language name before saving.
- or, copy the daughter template preload model and paste into the new daughter template, Template:Expand XXXX
- Edit the template, and adjust:
- change dummy language code ('xx') to ISO-639 code (French ⟶ 'fr', German ⟶ 'de', etc.[a])
- adjust parameters (see below); in particular, the topic codes (per subcategories; see #Required follow-up steps), and save the page.
Parameters available
संपादित करेंThese parameters can be used in the creation of a daughter template. Language code (|langcode=
) and language name (|name=
) can be found at meta:Table of Wikimedia projects#Projects per language codes.
|date=
– pass-thru; set to{{{date|}}}
|fa=
– used in category name generation. For featured articles, set|fa=yes
|langcode=
– 2- or 3-letter language code.[a] E.g.,fr
.|name=
– Full name of the language in English; col 2 in the table. E.g.,French
|no interwiki=
– pass-thru; set to{{{no interwiki|}}}
|nodoc=
– pass-thru; set to{{{nodoc|}}}
|otherarticle=
– set to{{{1|}}}
; blocks generation of tracking categories for missing args only needed in parent template.|section=
– pass-thru; set to{{{section|}}}
|topic=
used in category name generation; may be any string, but has conventional usage; see #Topics below.|googlelangcode=
– rarely used. See below.
Do not use |langcode2=
, |langcode3=
, |otherarticle2=
, or |otherarticle3=
.
Topics
Use of |topic=
is a shorthand designed to make it easier for the user to categorize an article needing language expansion into the right subcategory. A user may use the simple invocation {{Expand French|topic=gov}}
, for example, resulting in categorization into "Category:Government and politics articles needing translation from French Wikipedia", without having to remember details of the Category name, or what categories are available. Not all Expand language templates use |topic=
, but those that do, choose the allowed topic values from the set bio, cult, geo, gov, hist, mil, sci, sport, struct, tech, and transport, which imply one of a set of conventionally named subcategories.
If there are too many articles in a language category, new subcategories may be created to hold them, and if desired, a new topic code may be added to the template to handle it,[b] even one not in the list of topic values above.[c]
Uncommon override parameters
Param |googlelangcode=
is only needed for cases where Google's language translation code is not the same as the Wikipedia language translation code. The only case currently, is for the Norwegian language variety Nynorsk, and is used in Template:Expand Norwegian (Nynorsk). Sample use:
| googlelangcode=no <!--Not the English negative, but the langcode -->
Required follow-up steps
संपादित करेंAfter creating a new daughter template, you need to create the Template doc page, and the main tracking category for the language. If there are many hundreds or thousands of transclusions of the template, the tracking category may get very long and hard to browse; subcategories may be created for subtopics such as biographies, geography, and so on. In the steps below, 'XXXX' represents the language name of the template you just created; so, 'XXXX' is French for Template:Expand French.
- Template:Expand XXXX/doc
- OR: go to Template:Expand XXXX/doc, and paste
{{Expand language/howto|XXXX}}
.
at - OR: go to Template:Expand XXXX/doc, and paste
- OR: go to Category:Articles needing translation from XXXX Wikipedia and paste a copy of साँचा:भाषा विस्तार/category preload.
at "Category:Articles needing translation from XXXX Wikipedia" (changing 'XXXX' to language name)
Optional follow-up
If subcategories are needed because there are too many articles for the main category, then:
- Create subcategories as needed, corresponding to one of the standard Topic codes
- Custom subcategories outside the standard Topic codes may be created if needed (see e.g., commune in {{Expand French}})
- If a subcategory is associated with a custom Topic code, then create the optional template subpage "/topics" and adjust row content as needed:
Topics and categorization
संपादित करेंTransclusion of a daughter template categorizes the page into one or more categories based on the parameters. The language codes are converted to the full name of the language, thus fr becomes French in the category name string, de becomes German; and so on. Topic codes are usually expanded. For example, when used as part of a Category name, topic code geo becomes Geography, gov becomes Government and politics, and so on. The exact list of available topic codes and their expansions depends on the individual daughter templates.
- With a
|topic=
parameter: Category:<topic> articles needing translation from <language> Wikipedia - Without
|topic=
: Category:articles needing translation from <language> Wikipedia - For param
|fa=
: Category:Featured articles needing translation from <language> Wikipedia
Using the |topic=
parameter categorizes the article in a subcategory associated with the topic value. Some Expand language templates have subcategories and associated topic values, and others don't. As an example, this table[d] shows the |topic=
codes available for {{Expand French}}, and links to the subcategory for each one:
साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row साँचा:EL table row
topic code | topic name and category for Expand French | articles in category |
---|
Not all languages have subcategories for every topic; here's {{Expand Catalan}} with three topics/subcategories:
साँचा:EL table row साँचा:EL table row साँचा:EL table row
topic code | topic name and category for Expand Catalan | articles in category |
---|
Most languages have fewer transclusions of the template, and don't need subcategories; for example, {{Expand Hindi}}, {{Expand Persian}}, or {{Expand Turkish}}.
Examples
संपादित करेंFor a generic, copy-paste model that may be used for starting a new, daughter template, see Template:Expand language/template preload. For some actual examples, see:
- {{Expand German}}
- {{Expand Catalan}}
- {{Expand French}}
- {{Expand Basque}}.
Direct transclusion on article pages
संपादित करेंA secondary use of this template is to place it directly on an article page. This generally should be avoided when a specific language template (such as {{Expand French}}) is available for use instead. But direct transclusion may be useful for an article that can be improved with translations from more than one foreign-language Wikipedia.
Usage
संपादित करें{{Expand language |langcode=xx |otherarticle=<Article-1 in lang-xx> |langcode2=yy |otherarticle2=<Article-2 in lang-yy> |langcode3=zz |otherarticle3=<Article-3 in lang-zz>}}
Tip: If there is only one language involved, then do not use this template.[e]
Parameters
संपादित करें|langcode=
– 2- or 3-letter language code of the first foreign Wikipedia article to link[a] E.g.,fr
. Required.|langcode2=
– code of the second foreign Wikipedia article.[e] E.g.,de
. Optional.)|langcode3=
– code of the third foreign Wikipedia article.[a] E.g.,es
. Optional.|otherarticle=
– name of the article in the original language, corresponding to the first langcode. Required.|otherarticle2=
– name of the article in the original language, corresponding to the second langcode. Optional.[e]|otherarticle3=
– name of the article in the original language, corresponding to the third langcode. Optional.|section=yes
– optional; set to 'yes' when used in a section of the article instead of at the top. Optional.|date=
– optional; updated by bot if omitted.|fa=
– optional; whether the article is a feature article or not.
Do not use these parameters for direct transclusion:
|name=
(defaults to 'Expand language'; only needed for transcluding templates; could change css class membership if altered, which could affect rendered appearance of the box)|topic=
(could interfere with categorization)
Examples
संपादित करें इस अनुभाग में कोई सामग्री नहीं है। आप इसमें जानकारी जोड़कर विकिपीडिया की सहायता कर सकते हैं।(April 2021) |
Expensive parser functions
संपादित करेंThis template uses between 1 and 9 expensive parser functions depending on what parameters are used. On certain pages with very large numbers of other templates using expensive parser functions this may result in template limits being hit.
Notes
संपादित करें- ↑ अ आ इ ई For values of
|langcode=
, see column one from meta:Table of Wikimedia projects#Projects per language codes. - ↑ The association between a topic value and a category name occurs in the template code, in the #switch statement. Adding a new topic involves changing the #switch statement to associate the new topic with the desired category name. This will also add one to the tally of expensive parser function calls.
- ↑ In this case, the new code will not appear in the table of topics and categories in the #Categorization section of the template doc page. To add it, you need to add a line to the
/topics
subpage to add a row to the topics table in the doc, for each new topic added that is not in the list. See for example, the use of|topic=commune
in {{Expand French}}. - ↑ This section of the doc page uses fifteen expensive parser function calls; one for conditional inclusion of the
|fa=
and|topic=
parameters, and ten for the rows in the topic table. Fifteen is a low number, and this is no cause for concern. - ↑ अ आ इ If there is only one langcode and otherarticle name, then this template probably isn't the right one. Use one of the daughter templates instead.
कोई विवरण नहीं।
पैरामीटर | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
name | name | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
subst | subst | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
langcode2 | langcode2 | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
section | section | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
otherarticle | otherarticle | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
langcode | langcode | कोई विवरण नहीं | अज्ञात | आवश्यक |
override_language | override_language | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
langcode3 | langcode3 | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
otherarticle3 | otherarticle3 | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
otherarticle2 | otherarticle2 | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
date | date | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
googlelangcode | googlelangcode | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
topic | topic | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
demospace | demospace | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
nodoc | nodoc | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
category | category | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
fa | fa | कोई विवरण नहीं | अज्ञात | वैकल्पिक |
no interwiki | no interwiki | कोई विवरण नहीं | अज्ञात | वैकल्पिक |