Difference between revisions of "Template:En/doc"
Jump to navigation
Jump to search
imported>Lfdder |
imported>PC-XT (updating doc to include requested sandbox changes, while still allowing current form) |
||
| Line 5: | Line 5: | ||
{{Commons|Template:En}} | {{Commons|Template:En}} | ||
| − | + | == Usage == | |
| − | + | This template was imported from [[commons:Template:en]] to handle language issues that English Wikipedia does not face. It is used on files from Commons or files preparing to be moved to Commons. | |
| − | |||
| − | |||
| − | + | === Examples === | |
| + | * <nowiki>{{en|English translation}}</nowiki> produces {{en|English translation}} | ||
| + | * <nowiki>{{en|1=English translation with links}}</nowiki> produces {{en|1=English translation with links}} | ||
| + | * <nowiki>{{en}}</nowiki> produces {{en}} (incorrect usage) | ||
| − | + | === Transclusion error === | |
| − | + | If this template is used outside of File: namespace, it produces the following error: | |
| − | + | ||
| + | <strong class="error">Transclusion error: {{tl|En}} is only for use in File namespace. Use {{tl|lang-en}} or {{tl|en icon}} instead.</strong> | ||
| + | |||
| + | To fix this error, uses of <nowiki>{{en}}</nowiki> without parameters should usually be replaced by {{tl|en icon}} (or just the language name) and uses with a parameter by {{tl|lang-en}}. In a cite, to fix {{para|language|<nowiki>{{en}}</nowiki>}} simply remove the curly braces to leave {{para|language|en}}. | ||
=== See also === | === See also === | ||
Revision as of 06:16, 23 February 2014
| This is a documentation subpage for Template:En. It contains usage information, categories and other content that is not part of the original template page. |
| This template is only for use in File namespace, when moving files between here and Commons. |
Usage
This template was imported from commons:Template:en to handle language issues that English Wikipedia does not face. It is used on files from Commons or files preparing to be moved to Commons.
Examples
- {{en|English translation}} produces Transclusion error: {{En}} is only for use in File namespace. Use {{lang-en}} or {{in lang|en}} instead.
- {{en|1=English translation with links}} produces Transclusion error: {{En}} is only for use in File namespace. Use {{lang-en}} or {{in lang|en}} instead.
- {{en}} produces Transclusion error: {{En}} is only for use in File namespace. Use {{lang-en}} or {{in lang|en}} instead. (incorrect usage)
Transclusion error
If this template is used outside of File: namespace, it produces the following error:
Transclusion error: {{En}} is only for use in File namespace. Use {{lang-en}} or {{en icon}} instead.
To fix this error, uses of {{en}} without parameters should usually be replaced by {{en icon}} (or just the language name) and uses with a parameter by {{lang-en}}. In a cite, to fix |language={{en}} simply remove the curly braces to leave |language=en.
See also