The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Creating new XML locale language file, howto?

Discussion in 'User Experience' started by Gino Viroli, Aug 13, 2010.

  1. Gino Viroli

    Gino Viroli Active Member

    Joined:
    Oct 2, 2007
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  2. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    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'.

    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.
     
  3. Gino Viroli

    Gino Viroli Active Member

    Joined:
    Oct 2, 2007
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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
     

    Attached Files:

  4. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    You're welcome

    Yes

    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:

     
  5. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    "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.
     
  6. cPBrianW

    cPBrianW Sysadmin
    Staff Member

    Joined:
    Jan 26, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Downloading/uploading XML files in order to modify locales can sometimes be tricky. More information can be found here:

    Modifying Locales
     

Share This Page