In this chapter, we will discuss the details of Plesk localization.
To prepare locale files for translation:
Plesk locale files are PHP files with simple associative arrays made up of records like
'<localization_key>' => '<message>',
or
'<localization_key>' => "<message>",
where
<localization_key>
uniquely identifies a GUI item.<message>
is human-readable text describing a particular GUI item, and appearing as either a GUI element or contextual help text.To translate the Plesk GUI into a particular language, edit the files by translating all string parts containing messages (<message>
), leaving localization keys and string syntax intact.
The Translating Plesk GUI Messages section provides more information on translating locale strings.
After you have finished editing the locale files, to avoid possible issues caused by broken PHP syntax, we recommend that you validate the new locale files after translation.
To validate the translated files:
#php -l <file-name>
for example,
#php -l conhelp_pt-BR.php
To import the new locale into Plesk:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "replace into locales values ('<xx-YY>', 'true')"
>cd /D "%plesk_dir%\Databases\MySQL\bin"
>mysql -P8306 -uadmin -p<Plesk admin password> psa -e "replace into locales values ('<xx-YY>', 'true')"
Where <xx_YY> is the code of your locale.