Complete Instructions/Guide to add locales support to cPanel plugin (Tools->Software)

Andrii

Registered
Jan 24, 2023
2
0
1
Canada
cPanel Access Level
Root Administrator
I am one of the development team, which currently try to add locales support to developed cPanel plugin, which was installed to Tools->Software Section.
Little bit more details:
- Plugin developed using perl, php, js;
- All displayed translations, that needs to be visualized are located in perl landings;

After few tries, using Cpanel::Locale as described here and after trying upload as described here translations via XML/XLF (manually or/and via WHM upload/download tools) all this was unsuccessful, and we never saw any result.

So question is, is there documentation, or an exhaustive guide on how to add translations, for example, as it is done in PHP (separate files are created for each of the needed languages, and after that everything works using key-value pairs for all translations). Maybe someone has experience with this case and can share it, your your support is greatly appreciated.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,329
2,102
363
cPanel Access Level
Root Administrator
Hey there! I did reach out to our user interface team, and I'm waiting to hear back to see if they have more details because it sounds like you have done everything right on your side. I'll let you know when I hear something.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,329
2,102
363
cPanel Access Level
Root Administrator
Here are the details I got from the development team:

Code:
 If the plugin code is written in Perl or uses Template Toolkit, then they would have to use the Perl Modules we use to do localization after adding the locale data to the locale database.  If the localization is for javascript, they would likely have to generate localization files with the lookups from English phrases to the other locale for each locale and include those. 

They can also implement their own solution for their plugin backend code or frontend code that uses another system besides our proprietary one.

Most of the locale systems we document allow users to upload complete locales for the strings we ship in the product, not for plugin devs. They can add new languages this way that we don’t currently support and can override poorly translated locales.

It may be necessary to open a ticket so we can validate what the plugin dev did.
So there you go - if those details don't help, it might be best to create a ticket with our team so we can check this out.