Adjusting Language Pack Source File

An XML document describing Plesk Sitebuilder locale looks as follows (U.S. English as example):

<?xml version="1.0" encoding="UTF-8"?>
<locale>
	<code>en_US</code>
	<info>
		<native_name>English, United States</native_name>
		<english_name>English, United States</english_name>
		<decimal_point>.</decimal_point>
		<monetary_unit_code>USD</monetary_unit_code>
		<currency_symbol_left>$</currency_symbol_left>
		<currency_symbol_right></currency_symbol_right>
		<date_format>n/j/Y</date_format>
		<time_format>g:i:s A</time_format>
		<week_begin>1</week_begin>
	</info>
	<product>
		<name>Plesk Sitebuilder for Linux/Unix</name>
		<version>4.0.x</version>
	</product>
	<section>
		<name>Components/Message/Fake.lng</name>
		<data>
			<entry>
				<keyword>1_author</keyword>
				<phrase>Author1</phrase>
				<comment></comment>
			</entry>
		</data>
	</section>
</locale>

 

To adjust the LP source file:

  1. Open the LP source file in your favorite text or XML editor.

    Note: The editor you choose must support working with text with UTF-8 encoding.

  2. Specify the culture code for the LP (the code element). For example, en_AU.

    Codes serve as unique identifiers of LPs in Plesk Sitebuilder. Plesk Sitebuilder LPs' codes follow the RFC 1766 standard in the format "<languagecode2>_<country/regioncode2>", where <languagecode2> is a lower-case two-letter code derived from ISO 639-1 and <country/regioncode2> is an upper-case two-letter code derived from ISO 3166. For example, U.S. English is "en_US". In cases when a two-letter language code is not available, the three-letter code derived from ISO 639-2 is used. For example, the three-letter code "div" is used for cultures that use the Dhivehi language. Some culture names have suffixes that specify the script. For example, "Cyrl" specifies the Cyrillic script, "Latn" specifies the Latin script. For the list of culture codes, refer to the Appendix.

    Note: Only one LP can be installed into a single Plesk Sitebuilder instance for any culture, but arbitrary number of LPs can be installed for different cultures simultaneously.

  3. If necessary, modify the culture-dependent data for the LP (child elements of the info element):
  4. Translate/Modify the texts of the interface messages, which are the contents of the phrase elements (section > name > data > entry > phrase).

    Note that some interface messages contain words and special symbols which must not be modified or translated. Among them are:

  5. To add explanatory comments to the messages (for example, specifying where a message appears in the interface), add the relevant contents to the corresponding comment elements.

    This explanatory text is not displayed in the interface and is meant only to facilitate your work with the XML document.

  6. Close the file and rename it to the culture code you specified at step 2 (in the current example, en_AU.xml).

Important: Consider that the value of the encoding attribute (UTF-8) and the contents of the elements: name, version, keyword must NOT be modified.

 

Now the source file is ready for compilation to an installable language pack. Prior to proceeding to this step, we recommend to verify that the resulting XML document conforms to the XML syntax rules:

For more details about XML standards, refer to the W3C Web site.