In the WordPress administration interface, there are various messages that must be translated. Some of these messages are seen frequently, while others are only seen occasionally. Each of these message types are documented below, along with examples.
Labels are often used in the context of HTML <label>, <legend>, <a>, or <select> tags. They are short and precise descriptors of the purpose of a UI element. These can be very difficult to translate at times, especially if they are single words, and if the word used in English can be interpreted as either a noun or imperative verb. With most labels you will need to do some searching through the code to find the context of its use before coming up with an appropriate translation.
Because so many of the messages are part of the WordPress administration interface, Labels are probably the most frequent type of message to translate.
“Post” could be interpreted as an imperative verb, but in this context it’s a noun. The noun form of “post” in English can be difficult to translate, and the most appropriate translation has been difficult for some teams to decide upon. Many translations use their language’s equivalent to the English “Article,” as the one below, from the Finnish (Finland) translation does.
Another example of a label is seen here, from the Hindi translation.
Labels with surrounding dashes, as in the example below (from the Welsh translation), can be eliminated or replaced if they might be confusing to users in your target locale, or if there are different established conventions for your locale.
Informational message are usually composed of full sentences. They convey information or request an action from a user. Since these tend to be longer than labels, they tend to be slightly easier to translate. However, with the longer messages comes more variation in the level of formality (or informality), which is something translators need to be aware of.
In the example below – from the Bulgarian translation – the information message contains a modified English formulaic expression (“the check/cheque is in the mail”), which contributes to its informality.
msgid "Your new password is in the mail."
msgstr "Вашата нова парола е в електронната ви поща."
Error messages tend to be more formal, simply because they’re short and concise, as seen in this example from the Swedish translation.
Of course, not all error messages are formal in the WordPress interface. The below example, from the German translation, shows an error message with an informal tone.
msgid "Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy."
msgstr "Leider kannst du nur alle 15 Sekunden einen neuen Kommentar eingeben. Immer locker bleiben."
Rather than using PHP’s built-in locale switching features, which is not configured properly for very many languages on most hosts, WordPress uses the gettext translation module to accomplish date and time translations and formatting.
WordPress translates all of the following date and time settings.
Note the unusual msgid in the example above. These messages should not be translated literally. The msgid here is a hack that is used because the full name and abbreviation are the same in English and Gettext would erroneously combine the two into one entry. (From the Italian translation.)
The weekday initials are for WordPress’s calendar feature, and uses the same hack as the month abbreviations above to get around the fact that in English Tuesday and Thursday share the same first letter. Not all locales use single-letter abbreviations for all days. In the example above, Norwegian Bokmål uses an extra letter to distinguish tirsdag (Tuesday) and torsdag (Thursday).
These are PHP date() formatting strings, and they allow you to change the formatting of the date and time for your locale.
WordPress uses the translations elsewhere in the localization file for month names, weekday names, etc. This special string is for the selection of which elements to include in the date & time, as well as the order in which they’re presented.
Many messages contain special PHP formatting placeholders, which allow the insertion of untranslatable dynamic content into the message after it is translated. The PHP placeholders come in two different formats:
%s: used when only one placeholder is present. %1$s, %2$s, %3$s, …: numbered placeholders, which enable translators to rearrange their order. This allows for more flexibility in the translated string while ensuring the dynamic content will still be inserted in the right places.
Stop words are very common words that should be excluded from a search, like ‘a’, ‘the’, and ‘and’. You should not simply translate these individual words into your language. Instead, look for and provide commonly accepted stopwords in your language.
WordPress core’s comparison algorithm for stop words is looking for exact matches, so if your language makes use of diacritic marks, be sure to include all possible variation of a stop word in the list (e.g “pravé” and “právě”).
There’s no need to add single letter stop words (if those letters are in the A-Z range).
msgctxt "Comma-separated list of search stopwords in your language"