Template:En

From Miraheze Commons
English: abc
Template documentationpurge ]

Adds "
English:
" in front of the text written in English. Also adds machine-readable tags identifying the text as being written in English.

The template automatically sets the following categories:

Usage

{{en |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1textText to be displayed. Please prepend "1=" to the text, otherwise any "=" characters in the text will break the template.emptyrequired
inlineinlineOptional, default is empty string. When set to any value different from an empty string, 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)emptyoptional
Template data
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is 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 by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Miraheze Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various wiki.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


FAMEPedia's help about TemplateData{{{info}}}

Adds "English" in front of the text written in English. Also adds machine-readable tags identifying the text as being written in English.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
text1

Text to be displayed.

Stringrequired
inlineinline

Optional, default is empty string. When set to any value different from an empty string, 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)

Lineoptional

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:

Example

{{en|1=Abcdefghijklmnopqrstuwxyz}}

renders as:

English: Abcdefghijklmnopqrstuwxyz

See also

Localization

This template is not intended to be localized.

It relies on {{#language:...}} parser function for localization.

Other multi-lingual templates

Help for choosing the right template for your use case:
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}}
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 that do not have language subpages (e.g. not having Main 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 that do have language subpages; most of the time these will be pages prepared with the Translate Extension
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 least n languages 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:
  • LTR scripts: Latin, Latin or Cyrillic, Cyrillic, Greek, other simple LTR alphabets (Armenian, Georgian, etc.), abugidas (North Indian, South Indian, other South-East Asian, etc.), syllabaries (European, American, African, Asian), Korean alphabets (basic Jamos, Hangul including some sinograms), Japanese syllabaries (including some sinograms), sinograms (including some syllabaries)
  • RTL scripts: Hebrew, Arabic, other RTL abjads (Divehi, etc.), RTL syllabaries (N'ko)
As provided by the user in the wikitext (any inconsistent order may be difficult to lookup visually) N/A
Search indexing 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