Language Bundle Compiler

(version 2.4 and higher)


Related Docs:   Introduction to Bundles Interface Text Customization Adding New Languages

H-Sphere 2.4 and up provides a new scheme of interface text customization and multilingual support. Language bundles - default, custom, and those installed with H-Sphere packages - are now compiled and merged into the resulting internal bundles located in the internal bundle directory, ~cpanel/shiva/languages by default. Instead of parsing default and custom bundles, H-Sphere now takes interface texts directly from this directory.

Merging language bundles is performed by a Java tool called language bundle compiler:

java psoft.hsphere.LangBundlesCompiler



You need to run bundle compiler if you customize language bundles, namely:

Also, bundle compiler is launched when you install a package with language bundles.


How Does Language Bundle Compiler Work

  1. Bundle compiler parses the LANG_LIST parameters set in:

    LANG_LIST contains definitions for the languages, delimited with whitespace, each including the following components:



    • <language>, <COUNTRY>, and <ENCODING> are Java locale identifiers. For detailed description and the tables of canonical identifiers, please refer to Understanding Language Bundles"). <ENCODING> is an encoding in which bundles were created and saved,
    • <HTML_ENCODING> is the HTML-compliant encoding (this parameter is deprecated since 2.4 and is not really used but must still be specified for the sake of compatibility);
    • misc.langs.<LABEL>lang is a label for language name in H-Sphere.

    According to Java locale identifiers set in the LANG_LIST parameters, bundle compiler looks for the bundles:




    in the following directories, in order of priority:

    • installed package bundles: ~cpanel/shiva/packages/PackageName.

      Package bundle location is set in the package properties file ~cpanel/shiva/packages/PackageName/


    • custom bundles: ~cpanel/shiva/custom/bundles.

      Custom bundle location is set in


    • default bundles: ~cpanel/shiva/psoft/hsphere/lang.

      Default bundle location is set in


    See Introduction To Bundles for details.

  2. Bundle compiler merges default, custom and package bundles with the same filenames and save the resulting bundles in UTF format into the internal bundle directory ~cpanel/shiva/languages.

    See Bundle Lookup Sequence for HS 2.4 and up.


    • If the ~cpanel/shiva/languages directory is not found, language bundle compiler will be launched automatically and will create this directory with the resulting bundles.

    • To override the default internal bundle directory, set the INT_LANGBUNDLE_DIRECTORY parameter in Or, set INT_TEMPLATE_BUNDLE, INT_MENU_BUNDLE, INT_USER_BUNDLE to override the location of the respective internal bundles.

    • When a text label is set several times, e.g., in a package bundle and in a custom/default bundle, package bundle takes precedence and override labels set in custom or default bundles. The order of priority is: package bundles, custom bundles, default bundles.

    • Depending on bundle encodings specified in the LANG_LIST parameters, bundle compiler converts all regional language bundles into UTF-8. This is done due to the Java restrictions in relation to regional encodings: Java can work only with ISO-8859-1 and UTF symbols.


      a) To convert regional symbols into Unicode, you can use the native2ascii JDK tool.

      b) To convert a lang file into Unicode, you can also run make in the ~cpanel/shiva/psoft/hsphere/lang directory.

Related Docs:   Introduction to Bundles Interface Text Customization Adding New Languages

Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map