Creating new XML locale language file, howto?

Gino Viroli

Well-Known Member
Oct 2, 2007
91
10
58
cPanel Access Level
Root Administrator
I'm trying to cerate a new locale language file (with the new 11.25.0+ locale systems).

I read docs at: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/WhmLocales

On my WHM i can download XML locale file, so I did download the "it.xml" locale.
I opened it up with my editor on my PC and translated some words.
Since I could not upload it via WHM cause it's disabled on my hoster, I asked my hoster to upload it for me on the server.

But they say it does not work.

My questions are:

1) is this the right way to go? I mean can I download the XML file, tanslate the words with an editor and then simply upload it up?

2) when I opened the XML file just downloaded, the editor turned some characets into grambled text because the ediotor did not recognize it was an UTF8 file. So i suppose there is no BOM header in the downloaded file. I forced the editor to open it up ad UTF8 and all charcters were then ok and perfectly diplaied, then I saved the file forcing the editor to add the BOM header. Am I supposed to upload the XML file in WHM with or without the BOM header?
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
720
11
243
1) is this the right way to go? I mean can I download the XML file, tanslate the words with an editor and then simply upload it up?
If you download 'it' then yes. Otherwise you should clone 'en' into 'it' and download 'it'.

If you download 'en', edit the text and re-upload it as 'it' then you're probably just broken 'en'.

2) Am I supposed to upload the XML file in WHM with or without the BOM header?
With or without BOM should be fine as the XML says it is utf-8 and the docs specify it should all be utf-8. That and the reliability of BOM's mean they are not used.
 

Gino Viroli

Well-Known Member
Oct 2, 2007
91
10
58
cPanel Access Level
Root Administrator
If you download 'it' then yes. Otherwise you should clone 'en' into 'it' and download 'it'.

If you download 'en', edit the text and re-upload it as 'it' then you're probably just broken 'en'.
1st of all thanks for the reply. :)

Originally I downloaded 'it.xml' and not the en.xml, then updated and then uploaded again, but it was not working.

Anyway, after your suggestion here, I decided to downaload also the en.xml and compared it with the it.xml.
I looked into the XML file and the it.xml is missing completely the keys for "x, x3, x3mail" it has got only "rvblue, rvgreen...". Since I'm using x3 that's the reason why is probably not working, see attached screenshot en-vs-it.jpg. *

So I suppose i have:

1. to clone en.xml into it.xml
this will create a new it.xml file with the x, x3, x3mail keys in it.

2. download the new freshly cloned it.xml from WHM

3. update the it.xml with the italian words and uplaod it back.

Am I right? ;)


The question is how do I clone en.xml into it.xml? :confused:
Do i need to use a Unix shell command?





* FYI: WHM is saying that all available locales are ok with any theme have a look at screenshot: whm-available-locales.jpg
 

Attachments

cPDan

cPanel Staff
Staff member
Mar 9, 2004
720
11
243
1st of all thanks for the reply. :)
You're welcome

So I suppose i have:

1. to clone en.xml into it.xml
this will create a new it.xml file with the x, x3, x3mail keys in it.

2. download the new freshly cloned it.xml from WHM

3. update the it.xml with the italian words and uplaod it back.

Am I right? ;)
Yes

The question is how do I clone en.xml into it.xml? :confused:
1) WHM -> Locales -> Copy a Locale
2) Sey "Duplicate from" to "English"
3) Set "into" to "Italian (italiano)"
4) Press "Duplicate"
5) Once done you'll see this:

Click here to download 'it' in XML format. You can edit the XML and upload it here.
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
720
11
243
"We got advise to to clone the en.xml and Italian.xml from WHM, but we couldn't find an the Italian(Italiano) in the clone into drop down box."

That means it already exists, remove it first.