The localization of text in a cPanel Plugin allows users from a variety of places to access or use the given Plugin.
The process to be followed so as to successfully create and install a localized cPanel Plugin shall be traced in some detail as follows.
For instance, cPanel Plugins usually use CPAN’s Locale::Maketext::Utils module to carry out most of its tasks or functions.
When this file is being created for a localized plugin, the name value of each group and item in the file must be localized. That is what will allow cPanel to correctly localize and display the name of the plugin in its Home Interface.
In situations where the locate.maketext method is incompatible such as in the case of dynamicui.conf system’s localization, the LANG method may be used.
One may copy the locale file created by developers, exporting the same so that it may be updated and modified by translators and then importing it as the customized version of the locale for each language that one wishes to equip the Plugin with.
The custom locale may be imported using the /scripts/locale_import script. It may either be installed manually after it is imported or be incorporated into the Plugin’s installation script.
Once the aforementioned steps have been successfully completed the server’s locate databases can be rebuilt simply by running the /usr/local/cpanel/bin/build_locale_databases script.
This script recompiles all of the given server’s locales and may either be run manually at the time of the localization of the Plugin or be incorporated in the installation script of the same, therefore being run at the run of the Plugin’s installation.
Finally, once all of the previous steps have been executed, it is time to check the localization of the Plugin.
One may login to cPanel using a test account and navigate to the Plugin, checking to ensure that the localized text is displayed properly in each and all of the various languages included in the Plugin.