![]() | Note: When you edit this page, you agree to release your contribution under theCC0. SeePublic Domain Help Pages for more info. | ![]() |
Asystem message is a snippet of plain text (nowiki), wikitext,CSS, orJavaScript that can be used to customize the behavior of MediaWiki and its appearance for each language andlocale.MediaWiki uses messages for any user-facing part of the interface, allowing for internationalization and localization of the MediaWiki UI, for both core and extensions.All messages used in MediaWiki are defined in amessages file.
Messages can be overridden from their default values by editing them on-wiki.Each message has a wiki page in the MediaWiki namespace with its message key as the name of the page.For example, the "aboutsite" message is stored at MediaWiki:aboutsite.By default this namespace is restricted from editing unless the user has the "editinterface" permission.A list of all message pages can be found onSpecial:AllMessages.Editing interface messages is typically straightforward, just like editing a normal wiki page, but it is restricted to users with theeditinterface permission, which is assigned to administrators (and interface administrators) by default.
TheSpecial:AllMessages table contains two columns: the linked interface name, and the text.The text is horizontally split to show the default text above, and the customized text below.When a custom message does not exist, only the default will be shown.To customize a message, click the upper link in the left column (the name of the message).This link is red if the default text is in use, because the edit page is empty.
The lower links in the left column cells lead to the discussion pages for that message.
Overriding messages on the wiki is recommended only in the following cases:
How each message is used by MediaWiki, variables available, parameters used, limitations, et cetera is explained with thecomplete documentation in the qqq pseudo-language files, as permessage documentation guidelines.Some longer explanation pages may exist for some interface messages at the olderCategory:Interface messages.
In the same way as /en, /zu, /fr, ..., /qqq is a subpage of the article and is viewable directly.
qqq
is considered as a language in parameterlanguage=
of the request.MediaWiki version: | ≥ 1.18 |
In MediaWiki 1.18 and above, you can find a message key by browsing a wiki in the special pseudo-language codeqqx
, which can be done by appending?uselang=qqx
to the URL, or&uselang=qqx
if the URL already contains a?
character (example).All the messages will then be replaced by their message keys, so you can identify which message is responsible.Messages that are always in the content language will not be shown using qqx.
In case the page uses tabs like e.g.special page "Preferences" you will have to add the tab after theuselang
parameter, e.g.Special:Preferences?uselang=qqx#mw-prefsection-rendering
.
MediaWiki version: | ≥ 1.38 Gerrit change 765385 |
Before MediaWiki 1.38, fallback message keys were not shown, which made it difficult to identify the source of some messages, notably thepage navigation tabs. Since MediaWiki 1.38 fallback message keys are shown separated by slashes (/
).
MediaWiki version: | ≥ 1.43 Gerrit change 1025837 |
Before MediaWiki 1.43, override message keys (using hooks likeMessageCacheFetchOverrides) were not shown either, which made it difficult to identify the source of messages overridden by extensions (such asWikimediaMessages). Since MediaWiki 1.43 override message key is shown after an equals sign (=
).
All messages used in MediaWiki are defined in amessages file.
There are two types of message files in MediaWiki: JSON and PHP.As of April 2014, core MediaWiki and most of the maintained extensions were migrated to the JSON format.You should use JSON for all new development.For more information about the migration to JSON seeRequests for comment/Localisation format.
Starting from late 2013 a new file format for messages was introduced: JSON.This is plainJSON, familiar as a common generic data storage format.Every key in it is a message key, and the value is the message text.In addition, the special@metadata
key is used to store information about the translation, such as the translation authors.
Using JSON makes the localisation files more secure because it's not executable.It is also compatible with jquery.i18n, a JavaScript library developed as part ofProject Milkshake, which provides MediaWiki-like frontend localisation capabilities and is used by some extensions that want to be less dependent on MediaWiki, such asVisualEditor andUniversalLanguageSelector.
Because the wider suite of internationalisation and localisation tools were called "Project Milkshake", some people call this format "banana".
In MediaWiki core, localisation files are placed in thelanguages/i18n
directory.MediaWiki extensions usually place theirs in ani18n/
subdirectory.If a large number of messages exist within a project, one may want to split these into two or more topical subdirectories for maintainability.In MediaWiki context, the$wgMessagesDirs configuration key is used to list these subdirectories.Here's an example from the VisualEditor extension for MediaWiki:
{"MessagesDirs":{"VisualEditor":["lib/ve/modules/ve/i18n","modules/ve-mw/i18n","modules/ve-wmf/i18n","lib/ve/lib/oojs-ui/i18n"]}}
You add new messages to the English "en" messages fileen.json
and document them in the message documentation file with the special pseudo-language code "qqq" –qqq.json
.See also:Adding new messages.
Currently the following metadata fields are used in the files:
Special characters like line breaks are escaped ("\n"
).
Unicode characters that represent letters in different alphabets are stored as real characters and not as character codes, because these files are sometimes read by people and because this makes the files smaller ("誼"
and not"\u8ABC"
).In any case, developers have few reasons to edit messages in any languages except English, because these are usually edited through translatewiki.net.
HTML code is not escaped either, so"<strong>Warning</strong>"
and not"\u003cstrong\u003eWarning\u003c/strong\u003e"
.
The JSON files are indented using tabs.
The older localisation file format is PHP.This is essentially a PHP array with all the messages.In core MediaWiki each language resides in its own file in the languages/message directory of the MediaWiki source code.In the extensions all the languages and the message documentation (qqq) are in the same file:ExtensionName.i18n.php, usually in the main directory of the extension.
To migrate system messages from PHP to JSON, use thegenerateJsonI18n.php script.It will move the messages to JSON files and replace the text of the PHP file with a shim that points to the JSON files.This boilerplate code is needed for backwards compatibility with MediaWiki 1.19.It is not used in new extensions that do not require MediaWiki 1.19 compatibility.
MediaWiki uses acentral repository of messages which are referenced by keys in the code.This is different from, for example, thegettext system, which extracts the translatable strings from the source files.The key-based system makes some things easier, like refining the original texts and tracking changes to messages.The drawback is that the list of used messages and the list of source texts for those keys can get out of sync.In practice this isn't a big problem, and the only significant problem is that sometimes extra messages that are not used anymore still stay up for translation.
To make message keys more manageable and easier to search for, always write them completely and don't rely too much on creating them dynamically.You may concatenate parts of message keys if you feel that it gives your code better structure — but only do this when there definitely are multiple possibilities,[1] and be sure to put a comment nearby with a list of the possible resulting keys. For example:
// Messages that can be used here:// * myextension-connection-success// * myextension-connection-warning// * myextension-connection-error$text=wfMessage('myextension-connection-'.$status)->parse();
See also thecoding conventions for dynamic identifiers.
To use a message in JavaScript, you have tolist it in the definition of your ResourceLoader module, in the"messages"
property.
The detailed use of message functions in PHP and JavaScript is onManual:Messages API.This is an important documentation page, and you should read it before you write code that uses messages.
Code looks up system messages from these sources:
zyx.json
, wherezyx is the language code for the language.MyExtensionName.i18n.php
.System messages are one of the more significant components of MediaWiki, primarily because it is used in every web request.The PHP message files are large, since they store thousands of message keys and values.Loading this file (and possibly multiple files, if the user's language is different from the content language) has a large memory and performance cost.An aggressive, layered caching system is used to reduce this performance impact.
MediaWiki has lots of caching mechanisms built in, which make the code somewhat more difficult to understand.Since 1.16 there is a new caching system, which caches messages either incdb files or in the database.Customised messages are cached in the filesystem and inmemcached (or alternative), depending on the configuration.
The table below gives an overview of the settings involved:
Location of cache storage | $wgLocalisationCacheConf | ||||
---|---|---|---|---|---|
'store' => 'db' | 'store' => 'detect' (default) | 'store' => 'files' | 'store' => 'array' (experimental since MW ≥ 1.26) | ||
$wgCacheDirectory | = false (default) | l10n cache table | l10n cache table | error (undefined path) | error (undefined path) |
=path | l10n cache table | local filesystem (CDB) | local filesystem (CDB) | local filesystem (PHP array) |
MediaWiki versions: | 1.27.0 – 1.27.2 Gerrit #Id3e2d2 |
In MediaWiki 1.27.0 and 1.27.1, the autodetection was changed to favor the file backend.In case'store' => 'detect'
(the default), the file backend is used with the path from$wgCacheDirectory.If this value is not set (which is the default), a temporary directory determined by the operating system is used.If a temporary directory cannot be detected, the database backend is used as a fallback.This was reverted from 1.27.2 and 1.28.0 because of conflict of files on shared hosts and security issues (seeT127127 andT161453).
To better visually depict the layers of caching, here is a function backtrace of what methods are called when retrieving a message.See the below sections for an explanation of each layer.
Message::fetchMessage()
MessageCache::get()
Language::getMessage()
LocalisationCache::getSubitem()
LCStore::get()
TheMessageCache
class is the top level of caching for messages.It is called from the Message class and returns the final raw contents of a message.This layer handles the following logic:
The last bullet is important.Language fallbacks allow MediaWiki to fall back on another language if the original does not have a message being asked for.As mentioned in the next section, most of the language fallback resolution occurs at a lower level.However, only theMessageCache
layer checks the database for overridden messages.Thus integrating overridden messages from the database into the fallback chain is done here.If not using the database, this entire layer can be disabled.
TheLCStore
class is merely a back-end implementation used by the LocalisationCache class for actually caching and retrieving messages.Like theBagOStuff
class, which is used for general caching in MediaWiki, there are a number of different cache types (configured using$wgLocalisationCacheConf):
db
(default) - Caches messages in the databasefile
(default if$wgCacheDirectory
is set) - UsesCDB to cache messages in a local fileaccel
- UsesAPC or another opcode cache to store the dataThefile
option is used by the Wikimedia Foundation, and is recommended because it is faster than going to the database and more reliable than the APC cache, especially since APC is incompatible with PHP versions 5.5 or later.
See also:Manual:Coding conventions
The message key must be globally unique.This includes core MediaWiki and all the extensions and skins.
Stick to lower case letters, numbers, and dashes in message names; most other characters are between less practical or not working at all.Per MediaWiki convention, first character is case-insensitive and other chars are case-sensitive.
Please follow global or local conventions for naming.For extensions, use a standard prefix, preferably the extension name in lower case, followed by a hyphen (-
).Exceptions are:
apihelp-
,apiwarn-
,apierror-
. After this prefix put the extension prefix. (Note that these messages should be in a separate file, usually underincludes/i18/api.)logentry-
,log-name-
,log-description
.right-
. The name of the action that completes the sentence "You do not have permission to $2, for the following reasons:" must begin withaction-
.tag-
.special-
.-desc
.They appear in the table onSpecial:Version, and their content must briefly explain what the extension does.
English messages almost never need different words that change because of a user's gender.English only needs this in the third-person pronouns ("he" and "she"), but these are surprisingly rare in messages.When this is necessary, use{{GENDER:$1|he|she|they}}
.
However, many other languages need different words depending on the user's gender, not only for third-person pronouns, but also for other pronouns, as well as for verbs in different tenses (e.g. "created", "deleted"), nouns (e.g. "mentor", "administrator"), adjectives (e.g. "new"), etc. It is therefore often useful to useGENDER
in English messages, even when there's only one English word. This gives translators a hint thatGENDER
can be used in a message. It also avoids warnings on translatewiki about missing parameters when an optional username parameter is missing (this happens especially often in log entry messages).
{{
-replacement, escaping for HTML, etc.)languages/i18n/en.json
, although some specific components, such as Installer, EXIF tags, ApiHelp, preferences, and some others, have their own message files.i18n/en.json
file or theen.json
file in the appropriate subdirectory. In particular, API messages that are only seen by developers and not by most end users are usually in a separate file, such asi18n/api/en.json
. If an extension has a lot of messages, you may create subdirectories underi18n
. All the message directories, including the defaulti18n/
, must be listed in theMessagesDirs
section inextension.json
or in the$wgMessagesDirs variable.qqq.json
in the same directory.qqq
) refers to another message in the same JSON file, try to put this message after the message to which it refers, so that translators will have a chance to translate the referred message before they translate the referring message. It's not always possible, for example when messages refer to each other, but please try to do it whenever it is possible. (The referring is usually done using the{{int:key}}
magic word in the message itself or using the{{msg-mw}}
template in theqqq
documentation. See the section onMessage documentation.){{SITENAME}}
".To flag such messages:
qqq
message documentation, that is respectively{{notranslate}}
or{{optional}}
;ignored:
oroptional:
;ignored =msg-key-1,msg-key-2
oroptional =msg-key-1,msg-key-2
.Remove it fromen.json
andqqq.json
.Don't bother with other languages.Updates fromtranslatewiki.net will handle those automatically.
In addition, check whether the message appears anywhere in translatewiki configuration, for example in the list of optional or most used messages (a simple git grep should be enough).Remove it from these lists if needed.
qqq.json
. If needed, the translatewiki.net team will take care of updating the translations, marking them as outdated, cleaning up the file or renaming keys where possible. This also applies when you're only changing things like HTML tags which you could change in other languages without speaking those languages. Most of these actions will take place intranslatewiki.net and will reach Git with about one day of delay.There is a pseudo-language codeqqq
for message documentation.It is one of the ISO 639 codes reserved for private use.There, we do not keep translations of each message, but collect English sentencesabout each message: telling us where it is used, giving hints about how to translate it, and enumerating and describing its parameters, link to related messages, and so on.Intranslatewiki.net, these hints are shown to translators when they edit messages.
Programmers must document each and every message.Message documentation is an essential resource – not just for translators, but for all the maintainers of the module.Whenever a message is added to the software, a correspondingqqq
entrymust be added as well; revisions which don't do so are marked "V-1
" until the documentation is added.
Documentation inqqq
files should be edited directly only when adding new messages or when changing an existing English message in a way that requires a documentation change, for example adding or removing parameters.In other cases, documentation should usually be edited in translatewiki.Each documentation string is accessible at https://translatewiki.net/wiki/MediaWiki:message-key/qqq, as if it were a translation.These edits will be exported to the source repositories along with the translations.
Useful information that should be in the documentation includes:
A few other hints:
You can link to other messages by using{{msg-mw|message key}}
.Please do this if parts of the messages come from other messages (if this cannot be avoided), or if some messages are shown together or in same context.
translatewiki.net provides some default templates that should be used in documentation, for example:
{{doc-action|[...]}}
- foraction-
messages{{doc-right|[...]}}
- forright-
messages{{doc-group|[...]|[...]}}
- for messages around user groups (group
,member
,page
,js
andcss
){{doc-accesskey|[...]}}
- foraccesskey-
messages{{doc-api*|[...]}}
- a set of templates for API help and API error messagesMore templates of this kind can be found in the categoryMessage Documentation Templates.Have a look at the templates' pages for more information.
Besidesdocumentation, translators ask developers to consider some hints so as to make their work easier and more efficient and to allow an actual and good localisation for all languages.Even if only adding or editing messages in English, one should be aware of the needs of all languages.Each message is translated into more than 300 languages and this should be done in the best possible way.Correct implementation of these hints will very often help you write better messages in English, too.
Localisation#Help and contact info lists the main places where you can find the assistance of experienced and knowledgeable people regarding i18n.
That's a prerequisite of a correct wording for your messages.
The translators discourage message re-use.This may seem counter-intuitive, because copying and duplicating code is usually a bad practice, but in system messages it is often needed.Although two concepts can be expressed with the same word in English, this doesn't necessarily mean they can be expressed with the same word in every language."OK" is a good example: in English this is used for a generic button label, but in some languages they prefer to use a button label related to the operation which will be performed by the button.Another example is practically any adjective: a word like "multiple" changes according to gender in many languages, so you cannot reuse it to describe several different things, and you must create several separate messages.
If you are adding multiple identical messages, please add message documentation to describe the differences in their contexts.Don't worry about the extra work for translators.Translation memory helps a lot in these while keeping the flexibility to have different translations if needed.
Languages have varying word orders, and complex grammatical and syntactic rules.Messages formed by multiple pieces of text, possibly with some indirection, also called "string concatenation", in code that cannot be directly controlled by translators, are called "lego" or "patchwork" messages in developers' jargon. It's practically impossible to translate "lego" messages correctly.
Make every message a complete phrase.Several sentences can usually be combined much more easily into a text block, if needed.When you want to combine several strings in one message, pass them in as parameters, as translators can order them correctly for their language when translating.
An exception from the rule may be messages referring to one another: 'Enter the original author's name in the field labelled "{{int:name}}" and click "{{int:proceed}}" when done'.This makes the message consistent when a software developer or wiki operator alters the messages "name" or "proceed" later.Without the int-trick, developers and operators would have to be aware of all related messages needing adjustment, when they alter one.
As much as possible, write messages in natural, human language.Try reading the message aloud and think: is this something that sounds like correct, grammatical English that humansspeak?If it's complex, hard to pronounce, or in any way unnatural in English, it will be even harder for translators and for users in other languages.
Avoid punctuation that is too technical or bureaucratic or that can't be read aloud.Slash (/
) should usually be replaced with "or".And/or should be replaced with "and" or "or".Sentences withcomma splice should be split into shorter sentences.
MediaWiki is used by very diverse people, within the Wikimedia movement and outside of it.Even though it was originally built for an encyclopedia, it is now used for various kinds of content.Therefore, use general terms.For example, avoid terms like "article", and use "page" instead, unless you are absolutely sure that the feature you are developing will only be used on a site where pages are called "articles".Don't use "village pump", which is the name of an English Wikipedia community page, and use a generic term, such as "community discussion page", instead.
Don't assume that a certain template exists on all wikis.Templates are local to wikis.This applies to both the source messages and to their translations.If messages use templates, they will only work if a template is created oneach wiki where the feature is deployed.It's best to avoid using templates in messages completely.If you really have to use them, you must document this clearly in the message documentation and in the extension installation instructions.
Some languages have to insert something between a date and a time which grammatically depends on other words in a sentence.Thus, they will not be able to use date/time combined.Others may find the combination convenient, thus it is usually the best choice to supply three parameter values (date/time, date, time) in such cases, and in each translation leave either the first one or last two unused as needed.
{{SITENAME}}
in messages{{SITENAME}}
has several disadvantages.It can be anything (acronym, word, short phrase,etc.) and, depending on language, may need the use of{{GRAMMAR}}
on each occurrence.No matter what, each message having{{SITENAME}}
will need review in most wiki languages for each new wiki on which your code is installed.In the majority of cases, when there is not a generalGRAMMAR
configuration for a language, wiki operators will have to add or amend PHP code so as to get{{GRAMMAR}}
for{{SITENAME}}
working.This requires both more skills, and more understanding, than otherwise.It is more convenient to have generic references like "this wiki".This does not keep installations from locally altering these messages to use{{SITENAME}}
, but at least they don't have to, and they can postpone message adaption until the wiki is already running and used.
What is rendered where depends on skins.Most often screen layouts of languages written from left-to-right are mirrored compared to those used for languages written from right-to-left, but not always, and for some languages and wikis, not entirely.Handheld devices, narrow windows, and so on may show blocks underneath each other, that would appear side-by-side on larger displays.Since site- and user-written JavaScript scripts and gadgets can, and do, hide parts, or move things around in unpredictable ways, there is no reliable way of knowing the actual layout.
It is wrong to tie layout information to content languages, since the user interface language may not be the page's content language, and layout may be a mixture of the two depending on circumstances.Non-visual user agents like acoustic screen readers and other auxiliary devices do not even have a concept of visual layout.Thus, you should not refer to visual layout positions in the majority of cases, though semantic layout terms may still be used ("previous steps in the form",etc.).
MediaWiki does not support showing different messages or message fragments based on the current directionality of the interface (seeT30997).
The upcoming browser and MediaWiki support for East and North Asian top-down writing[2] will make screen layouts even more unpredictable, with at least eight possible layouts (left/right starting position, top/bottom starting position, and which happens first).
The colour in which something is rendered depends on many factors, including skins, site- and user-written JavaScript scripts and gadgets, and local user agent over-rides for reasons of accessibility or technological limitations.Non-visual user agents like acoustic screen readers and other auxiliary devices do not even have a concept of colour.Thus, you should not refer to screen colours.(You should also not rely on colour alone as a mechanism for informing the user of state, for the same reason.)
HTML markup not requiring translation, such as enclosing<div>
tags, rulers above or below, and similar, should usually not be part of messages.It's an unnecessary burden on translators, and is often accidentally altered or skipped in the translation process.The translation interface has no syntax highlighting or validation, and mistakes are common.
Avoid complex wikitext markup as well.Wikitext is sometimes terser than writing the same thing in PHP, and it's tempting to write something like:
This is the[[{{MediaWiki:Validationpage}}|stable version]], [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} checked] on<i>$2</i>.[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur}} $3 pending{{PLURAL:$3|change|changes}}]{{PLURAL:$3|awaits|await}} review.
However, this is difficult for translators, especially when translating to right-to-left languages, because parts of the message must remain in English, resulting in text direction changing many times in one line:
هذه هي[[{{MediaWiki:Validationpage}}|النسخة المستقرة]]، [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} المفحوصة] في<i>$2</i>.[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur}}{{PLURAL:$3||تغيير واحد معلق|تغييران معلقان|$3 تغييرات معلقة|$3 تغييرا معلقا|$3 تغيير معلق}}]{{PLURAL:$3||ينتظر|ينتظران|تنتظر|ينتظر}} المراجعة.
It's best to pass any link targets as message parameters, and use only simple markup like[$1 Label]
and[[$1|Label]]
.
Skimming foreign language message files, you almost never find translated messages shorter than Chinese ones and rarely shorter than English ones. However, you will often find translations that are much longer than English ones.
Especially in forms, in front of input fields, English messages tend to be terse, and short.That is often not kept in translations.Languages may lack the technical vocabulary present in English, and may require multiple words or even complete sentences to explain some concepts.For example, the brief English message "TSV file:" may have to be translated in a language as literally:
Please type a name here which denotes a collection of computer data that is comprised of a sequentially organised series of typewritten lines which themselves are organised as a series of informational fields each, where said fields of information are fenced, and the fences between them are single signs of the kind that slips a typewriter carriage forward to the next predefined position each. Here we go: _____ (thank you)
This is, admittedly, an extreme example, but you get the trait.Imagine this sentence in a column in a form where each word occupies a line of its own, and the input field is vertically centered in the next column. :-(
For example, pages may have olderrevisions (of a specific date, time, and edit), comprising pastversions of said page.The wordsrevision, andversion can be used interchangeably.A problem arises, when versioned pages are revised, and the revision,i.e. the process of revising them, is being mentioned, too.This may not pose a serious problem when the two synonyms of "revision" have different translations.Do not rely on that, however.It is better to avoid the use of "revision"aka "version" altogether, then, so as to avoid it being misinterpreted.
There are some words that are hard to translate because of their very specific use in MediaWiki.Some maynot be translated at all.For example, there is no word "user" relating to "someone who uses something" in several languages.Similarly, inKölsch the English words "namespace" and "apartment" translate the same word.Also, in Kölsch, they say "corroborator and participant" in one word since any reference to "use" would too strongly imply "abuse".The term "wiki farm" is translated as "stable full of wikis", since a single-crop farm would be a contradiction in terms in the language, and not understood,etc..
<code>
,<var>
, and<kbd>
tags where neededWhen talking about technical parameters, values, or keyboard inputs, mark them appropriately as such using the HTML tags<code>
,<var>
, or<kbd>
.Thus they are typographically set off form the normal text.That clarifies their sense to readers, avoiding confusion, errors and mis-representations.Ensure that your message handler allows such markup.
Many symbols are localisable, too. Some scripts have other kinds of brackets than the Latin script has.A colon may not be appropriate after a label or input prompt in some languages.Having those symbols included in messages helps to make better and less Anglo-centric translations, and also reduces code clutter.
For example, there are different quotation mark conventions used in «Norwegian», ”Swedish”, »Danish«, „German”, and 「Japanese」.[3]
If you need to wrap some text in localized parentheses, brackets, or quotation marks, you can use theparentheses
($1) orbrackets
[$1] orquotation-marks
"$1" messages like so:
wfMessage('parentheses')->rawParams(/* text to go inside parentheses */)->escaped()wfMessage('brackets')->rawParams(/* text to go inside brackets */)->escaped()wfMessage('quotation-marks')->rawParams(/* text to go inside quotation marks */)->escaped()
Languages written from right to left (as opposed to English) usually swap arrow symbols being presented with "next" and "previous" links, and their placement relative to a message text may, or may not, be inverted as well.Ellipsis may be translated to "etc.", or to words.Question marks, exclamation marks, colons will be placed other than at the end of a sentence, not at all, or twice.As a consequence, always include all of those in the text of your messages, and never try to insert them programmatically.
Do terminate normal sentences with full stops.This is often the only indicator for a translator to know that they are not headlines or list items, which may need to be translated differently.
Make sure that the anchor describes the target page well.Always avoid commonplace and generic words.For example, "Click here" is an absolute no-go,[4] since target pages are almost never about "click here".Instead, Use precise action words telling what a user will get to when following the link, such as "You canupload a file if you wish."
See alsoHelp users predict where they are going, andmystery meat navigation, andThe main reasons why we shouldn't use click here as link text.
Avoid developer and power user jargon in messages. Try to use a simple language whenever possible.Avoid saying "success", "successfully", "fail", "error occurred while", etc., when you want to notify the user that something happened or didn't happen.This comes from developers' perspective of seeing everything as true or false, but users usually just want to know what actually happened or didn't, and what they should do about it (if at all). So:
MediaWiki's localised messages usually get edited within the wiki, either by wiki operations on live wikis, or by the translators ontranslatewiki.net.You should be aware of how whitespace, especially at the beginning or end of your message, will affect editors:
Start and end your message with active text; if you need a newline or paragraph break around it, your surrounding code should deal with adding it to the returned text.
There are some messages which require a space at the end, such asword-separator
(which consists of just a space character in most languages).To support such use cases, the following HTML entities are allowed in messages and transformed to the actual characters, even if the message otherwise doesn't allow wikitext or HTML formatting:[5]
 
– space
or 
–non-breaking space­
–soft hyphenOn a related note, any other syntax elements affected bypre-save transforms also must not be used in messages, as they will be transformed when the message is edited on the wiki.
Capitalisation gives hints to translators as to what they are translating, such as single words, list or menu items, phrases, or full sentences.Correct (standard) capitalisation may also play a role in search engines' assessment of your pages.MediaWiki usessentence case (The quick brown fox jumps over the lazy dog) in interface messages.
Always remember that many writing systems don't have capital letters at all, and some of those that do have them, use them differently from English.Therefore, don't use ALL-CAPS for emphasis.Use CSS, or HTML<em>
or<strong>
per below:
In normal text,emphasis likeboldface oritalics and similar should be part of message texts.Local conventions on emphasis often vary, especially some Asian scripts have their own.Translators must be able to adjust emphasis to their target languages and areas.Try to use "<em>
" and "<strong>
" in your user interface to allow mark-up on a per language or per script basis.
In modern screen layouts of English and European styles, emphasis has become used less.Do convey it in your#Message documentation still, as it may give valuable hints as to how to translate.Emphasis can and should be used in other cultural contexts as appropriate, provided that translators know about it.