Template:Ru
The template automatically sets the following categories:
- Category:Language templates with no text displayed(if parameter #1 isempty)
Usage
{{ru |1= }}
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | text | Text to be displayed. Please prepend "1=" to the text, otherwise any free "=" characters in the text willbreak the template. | (missing text) | required |
inline | inline | Optional boolean flag, false by default. When set to "true" (or "1", "t", "yes", "y", "on", etc. ), forces the template to be displayed inline, so that it does not break the current paragraph (that makes possible to put several descriptions side by side on a single line). Set to "false" (or "0", "f", "no", "n", "off", etc. ) or omit or leave blank, and each language will be in a separate line. | empty | optional |
Template data | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<templatedata>JSON</templatedata>./.{{TemplateBox}}
TemplateDatais a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used byVisualEditorand possibly other tools likeUpload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData•Commons-specific information Adds "русский" in front of the text written in Russian. Also adds machine-readable tags identifying the text as being written in Russian.
|
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Relies on:
Parameter #1
- Existing "1=" shall not be removed, even if it is not necessary, seeSpecial:Diff/592488152#removing_1=.
- when no free "=" -sign occurs in the text the "1=" is obsolete. Not-free equal signs (inside of template transclusions) don't count.
- without the "1=" but with one or more equal signs,no parameter #1 can be detected,and the error "parameter #1 is empty" is categorized.
- As another error, asuperflouspipe "|" character converts it to the contrary:
- while e.g.
{{en | some text | }}
will be understood, {{en |1=some text | }}
causes the same error "parameter #1 is empty".
- while e.g.
Required or necessary
When a parameter isrequiredthe template documentation expresses it with a line in the table, which left column shows theparameter name
,then a textual description for theparameter value
,and right the code (in this case) "required".
- A named parameterneedsto be specified by
name=
,which may as well be an alias, - a positional parameter is specified either by its positionorby the positional number (e.g. 1=, 2=, 3=...). With other words: theparameter valueisrequired,theparameter name(= the number) isoptional;itcannot berequiredand not evensuggestedbut it becomesnecessary(another thing than the un/requiredness in the sense of template documentation!) when (andonlywhen) the parameter value string contains a "free equal sign" (an equal signoutsideof another template).
The positional number is also necessary when positional parameters are specifiedoutside of their positional order,e.g. |2= |1= |3=
Example
{{ru|Abcdefghijklmnopqrstuwxyz}}
renders as:
See also
- Commons:Localization
{{#language}}
- Returns the local language name of a language code.- {{Language}}- Returns the translated language name of a language code.
Localization
This template is not intended to be localized.
It relies on{{#language:...}}parser function for localization.
Other multi-lingual templates
I18n templates: | {{Multilingual description|lang= |de,en,default=Deutsch/English |fr=français |... }} |
{{de|Deutsch}} {{en|English}} {{fr|français}} ... |
{{LangSwitch|lang= |de,en,default=Deutsch/English |fr=français |... }} |
{{Autotranslate}} | {{tnt}} | Language-aware transclusion |
---|---|---|---|---|---|---|
Recommended use at | Categories, galleries | File description pages(deprecated, can be safely replaced by{{Multilingual description}}) | Small templates, whenever the previous options are not suitable (removes the visual indication of the language before each translated text) | Data tables with translated cells or larger templates, when used on pages thatdo nothave language subpages (e.g. not havingMain page/en ,Main page/de ) and where the language displayed will be automatically determined by the language set in user preferences
|
Data tables with translated cells or larger templates, when used on pages thatdohave language subpages; most of the time these will be pages prepared with theTranslate Extension | Data tables with translated cells or larger templates, when used on pages thatdohave language subpages; the transcluded page needs to be prepared with theTranslate Extension,the transcluding page needs to be either prepared with the Translate Extension, or have the page language set by a translation administrator |
Requires JavaScript enabled for folding | Yes | No | ||||
Folding can be disabled by user | Yes | No | ||||
Folding is done server-side | No | Yes | ||||
Folding when at leastnlanguages are provided | 1 (all translations are shown without folding if the preferred language selected by the user has no matching translation) | 4 | 1 | |||
Detection of duplicate, incorrect, or unsupported language codes | Yes | No | Yes | Duplicate language codes are impossible by design. Incorrect or unsupported codes are never displayed, but not reported. The Translate extension's interface (if it's used on the translation subpages) doesn't let the user create translations with invalid codes, but other methods (e.g. entering the translation's URL directly) allow it without any warning. | ||
Allows the same translation to be used for several languages | Yes | No | Yes | |||
Supports language fallbacks | No | Yes | No | |||
Collation order of languages (when not folded) | Consistent order by native language name, languages grouped by script:
|
As provided by the user in the wikitext (any inconsistent order may be difficult to lookup visually) | N/A | |||
Search inde xing issues | No (all translations are included on the same page, however search results may be less relevant with many languages mixed) | Yes (may not index all languages depending on search engines, unless there's a list of links for visiting other languages) | Partially (where used; language subpages of templates are indexed) | No (translated pages should include a<languages/> navigation bar for visiting other languages)
| ||
Page size issues | Yes (may exhaust size or time limits in the wiki parser if many languages are included; larger pages to download for all visitors; slower navigation for visitors with slow Internet access; may be costly for visitors with limited data plans) | No (only the content for the selected language or a suitable fallback language is present in the generated page) | ||||
Contains expensive parser functions | No | Yes, checks for several translations along the fallback chain until finds a suitable | Yes, 2–4 checks per call | No |