- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Difference between revisions of "Template:Msg"
(Created page with "{{#eval:{{#delay:msg/{{{1}}}/{{INTERFACELANGUAGE}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{...") |
(update, allow base pages (with {{{t}}})) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#eval:{{#delay:msg/{{{1}}}/{{INTERFACELANGUAGE}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{6|}}}|{{!}}{{{6}}}}}{{#if:{{{7|}}}|{{!}}{{{7}}}}}{{#if:{{{8|}}}|{{!}}{{{8}}}}}{{#if:{{{9|}}}|{{!}}{{{9}}}}}{{#if:{{{10|}}}|{{!}}{{{10}}}}}{{#if:{{{11|}}}|{{!}}{{{11}}}}}{{#if:{{{12|}}}|{{!}}{{{12}}}}}{{#if:{{{13|}}}|{{!}}{{{13}}}}}{{#if:{{{14|}}}|{{!}}{{{14}}}}}{{#if:{{{15|}}}|{{!}}{{{15}}}}}{{#if:{{{16|}}}|{{!}}{{{16}}}}}}}}} | + | <includeonly>{{#eval:{{#delay:{{#if:{{{t|}}}|{{{t}}}/}}msg/{{lc:{{{1}}}}}/{{INTERFACELANGUAGE}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{6|}}}|{{!}}{{{6}}}}}{{#if:{{{7|}}}|{{!}}{{{7}}}}}{{#if:{{{8|}}}|{{!}}{{{8}}}}}{{#if:{{{9|}}}|{{!}}{{{9}}}}}{{#if:{{{10|}}}|{{!}}{{{10}}}}}{{#if:{{{11|}}}|{{!}}{{{11}}}}}{{#if:{{{12|}}}|{{!}}{{{12}}}}}{{#if:{{{13|}}}|{{!}}{{{13}}}}}{{#if:{{{14|}}}|{{!}}{{{14}}}}}{{#if:{{{15|}}}|{{!}}{{{15}}}}}{{#if:{{{16|}}}|{{!}}{{{16}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 00:56, 3 November 2013
(view - edit - history - purge) Documentation
Messages are part of a system which uses templates to store translations. This is a middle ground between using <translate>, which is difficult to use with template markup, and using {{int:}} for translations, which requires admin rights to edit messages.
Creating a new message
First, keep in mind that messages are meant to be used for markup-heavy pages, like templates.
- If you want to translate a content page, use the Translate tool on that page — it's easier to use, update translations with, and is designed specifically for content.
- If you want to edit system messages, such as the "edit" tabs above a page or the text on Special:RecentChanges, you will need to edit system messages, which require admin rights.
Naming conventions
- If the message you are creating is for a single template, create it in the following location:
Template:Template name/msg/message name
- If the message you are creating is likely to be used in many templates, you have multiple choices:
- If it is used in a single template most often, and in other templates occasionally (such as auxiliary templates), place it under the template that uses it most (see above)
- If it is used by a wide range of templates that all have a common role (e.g. creature-related templates), use a descriptive template name (this does not have to exist — messages can be placed at
Template:Creature/msg/messagename
without Template:creature existing, for example). - If it is a generic message which isn't necessarily part of a given template, but will be used in templates, place it at:
Template:Msg/message name
Enabling translation
Before you save (ideally), you will need to wrap the contents in the message in <translate> tags and mark the page for translation, just like a normal page. (This makes pages appear at the standard language subpages, which can be easily transcluded from the {{msg}} template).
Details
This template relies heavily on Mediawiki:Language-code - if this is not defined for a certain language, all messages for that language will fall back to English. These messages should appear in English, which is your current interface language setting. The following links can be used to change your language temporarily:
English · Spanish · French · German · Danish
For reference, the following languages are defined. If you attempt to use a language not defined here, all messages will fall back to English, even if translations exist for them in the appropriate /msg subpage. If you need to enable a language not listed here, post on the talk page.
Examples
{{msg|example}}
gives: This is an example message.
{{msg|t=av|old}}
gives: Template:Av/msg/old/en
Generic examples
These pages should not exist, but take note of the path names:
{{msg|message that does not exist}}
gives: Template:Msg/message that does not exist/en
{{msg|t=template|message}}