Translating Plesk GUI Messages
We recommend using a text editor which supports highlighting syntax for editing the locale files. Using such an editor makes translating more comfortable, and also helps you detect accidental changes to the syntax of the files.
Note: Use an editor that supports editing texts in UTF-8.
Important: Do not change the encoding of the files: It must be UTF-8. Otherwise, the messages you have translated may be displayed incorrectly.
There is a number of recommendations that might be useful when translating Plesk locale files, specifically concerning PHP array syntax, message variables, HTML entities, and special characters.
PHP array syntax
# It is important that commas at the end of each string are not removed. Otherwise, the PHP array will be corrupted, and Plesk GUI will display localization keys instead of the translated messages.
# Pay attention to the usage of quotation marks. Follow these guidelines to avoid making a mistake:
1. If the message text does not contain any quotes, enclose the text with either single or double quotes.
2. If the message text contains at least one single quote or apostrophe:
- precede each quote with a backslash:
'b_add_ip_for_clients' => 'Add IP address to client\'s pools.',
- enclose the message in double quotes:
'b_add_ip_for_clients' => "Add IP address to client's pools.",
3. If a message text contains at least one double quote:
- precede each quote with a backslash:
"Options that specify how MyODBC should work. See <a href=\"http://dev.mysql.com/doc/mysql/en/Connection_parameters.html\">http://dev.mysql.com/doc/mysql/en/Connection_parameters.html</a>",
- enclose the message in single quotes:
'Options that specify how MyODBC should work. See <a href="http://dev.mysql.com/doc/mysql/en/Connection_parameters.html">http://dev.mysql.com/doc/mysql/en/Connection_parameters.html</a>',
Pay special attention to the messages that contain variables:
- Leave variables as they are, do not translate them.
- Translate the running text of a message carefully, taking into account the meaning of the variable. Think of how the message will look in the Plesk GUI once the actual value has been substituted for the variable.
The following types of variables are used in the locale files:
For example, the message string
'The IP address %%ip_address%% was assigned to %%client_name%%.' may look like this in the Plesk GUI once the variables have been replaced:
The IP address 192.0.2.68 was assigned to John Doe.
Variables can substituted with other messages, as well as values taken from the Plesk operation context. For example:
'If you want the provided hosting to be the most secure, %%link%%. Note that some of the permissions, if granted, let subscribers change these settings. %%helpLink%%.',
'apply secure settings preset',
'Learn about secure hosting setting',
%%helpLink%% are substituted with the messages defined by the
secureSettingsHelpLink variables, respectively. So, the resulting message in Plesk looks as follows:
If you want the provided hosting to be the most secure, apply secure settings preset. Note that some of the permissions, if granted, let subscribers change these settings. Learn about secure hosting setting.
For example, the message string '
The domain resolves to another IP address (%1). Please correct DNS settings.' may look like this in the Plesk GUI once the variables have been replaced:
The domain resolves to another IP address (192.0.2.15). Please correct DNS settings.
Such variables may replace almost anything. In each string, the meaning of a particular variable of such type depends on the context. The value of the variable is dynamically set by Plesk when it displays the message in GUI.
HTML Entities and Special Characters
Do not translate the following items:
>used for defining "<" and ">" symbols.
\nused for defining a new line.
Leave your feedback on this topic here
If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.