Translation HowTo

Discussion in 'Tips/Tricks/Mods' started by SupuS, Aug 28, 2006.

  1. SupuS

    SupuS Member HowtoForge Supporter

    Hi all ..

    I translated ispconfig to czech language .. and here is small guide how you can translate ispconfig to your language too .. sorry for my english .. :rolleyes:

    I hope it somebody helps ..

    I wanted use utf-8 but it was not work properly .. so I used my national charset encoding .. I translated to czech language so I used cz as my lang and iso-8859-2 charset encoding.

    1. copy english language files

    you can use this to locate *.lng and *.hlp english files:

    # locate en.lng
    if you want translate help files too ..

    # locate *.hlp |grep en
    You can copy /root/ispconfig/isp/standard_index.html_en too if you want have localize standard index

    copy these files to new one .. in my case I copied its to cz.lng, cz*.hlp and standard_index.html_cz

    2. change setting in
    edit /home/admispconfig/ispconfig/lib/ from
    $go_info["server"]["lang"] = "en";
    $go_info["theme"]["charset"] = "iso-8859-1";
    to your language setting .. in my case to
    $go_info["server"]["lang"] = "cz";
    $go_info["theme"]["charset"] = "iso-8859-2";
    3. first testing if everything is ok ..
    reload your ispconfig .. if you don't see any changes all is ok :)

    4. Now translate text in new created files to your language ..
    remember that you have to use right charset encoding .. same as you will use on ispconfig pages. It will be a lot of work .. you will translate a lot of sentenses more than once .. so be patient .. sometimes check your work by reloading ispconfig .. it should be partialy translated ..

    Done? Now you have to change charset encoding in some files.

    5. changing and adding meta tags

    For properly working encoding you have to change or insert meta tags to some files .. here is list of its ..

    change from
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    to (change to your needs)
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
    or simply insert new line with (change to your needs)

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">

    /home/admispconfig/ispconfig/web/index.html (you can change title to your needs too ..)

    menu files (put meta tag after <title></title> tag):

    "loading folders" files (put meta tag after <title></title> tag):
    -- in these files change english text to your language too if you don't like "loading folders"


    6. Translating of error pages

    Go to /root/ispconfig/isp/ and copy error_en to error_XX (in my case error_cz) and edit *.html files in created directory.

    And it is all .. that was quite easy .. wasn't that? :)

    Little suggestion for Falco and Till .. if it is possible it would be nice to have meta tags in files listed here with charset encoding variable from file .. translation will be more easy ..

    Last edited: Dec 15, 2006
    madmucho likes this.
  2. falko

    falko Super Moderator Howtoforge Staff

    Nice guide. I think we can refer to this if anyone else is asking for translation guidelines. :)

    We'll check if/how this can be done. :)
  3. SupuS

    SupuS Member HowtoForge Supporter

    Thank you Falko .. for great peace of software :) Maybe I can create a little howto for template changing if somebody wants ..
  4. falko

    falko Super Moderator Howtoforge Staff

    I think there are lots of people who'd want this. :) Some have already asked in the forum... ;)
  5. VMartins

    VMartins New Member


    congratulations SupuS,

    I will follow this guide and build the Brazilian Portuguese version of ISPConfig.

    What I have to do after this translation to publish to anothers users?


  6. Hans

    Hans Moderator Moderator

    Contact Till. He can provide you an account for the SVN repository, so you can tranfer your work into it. If you do so, your work will be integrated in a near future release of ISPConfig.
  7. psaingtong

    psaingtong New Member

    I have Thai version of ISPconfig .Tell me about publish to your team.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks for translating ISPConfig to Thai. Please send the languages files to dev [at] ispconfig [dot] org
  9. nenad

    nenad Member

    just an idea...:

    in osCommerce they put this lines in some english.php file located under /languages:

    // look in your $PATH_LOCALE/locale directory for available locales..
    // on RedHat6.0 I used 'en_US'
    // on FreeBSD 4.0 I use 'en_US.ISO_8859-1'
    // this may not work under win32 environments..
    setlocale(LC_TIME, 'en_US.ISO_8859-1');
    define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
    define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
    define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
    define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date()
    define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
    and these lines too:

    // Global entries for the <html> tag
    define('HTML_PARAMS','dir="ltr" lang="en"');

    // charset for web pages and emails
    define('CHARSET', 'iso-8859-1');


    and somewhere in some file...

    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    <script language="javascript" src="includes/general.js"></script>
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    A setting for the chraset is already in the file. Are the global entries for the HTML tag nescessray? Then we will add them too.
  11. SupuS

    SupuS Member HowtoForge Supporter

    Yes charset HTML tags are necessary for right show national charsets :) .. you will safe a lot of work if you will add them ;)
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Charsets can already be set in, my question was if:

    dir="ltr" lang="en"

    in the tad <html dir="ltr" lang="en"> is really nescessary or just nice to have :)
  13. SupuS

    SupuS Member HowtoForge Supporter

    I saw bold text only ;) .. this tag elements are relevant for xhtml only .. so I think it isn't necessary for ispconfig now .. because it is in html. Change ispconfig to xhtml valid will be hard work .. because it use xhtml invalid elements in code .. adding dir="ltr" lang="en" elements and changing DTD is not sufficient to valid xhtml code
  14. Blackknight

    Blackknight New Member

    Has anybody started a Spanish translation? I'm not a native speaker but I could make one.
  15. falko

    falko Super Moderator Howtoforge Staff

    Spanish is available in ISPConfig but I think the translation isn't complete. :(
  16. sinjab

    sinjab New Member

    Right-to-left languages

    Thanks for the great ISPConfig.

    Yes till, <html dir="rtl"> is really necessary for Arabic and other right-to-left languages.
  17. TomTom80

    TomTom80 New Member

    Little change for FireFox


    I had to add following line (under <head> tag) in all inhalt_tree.php files under /home/admispconfig/web because FireFox do charset enconding according to each frame.

    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $go_info["theme"]["charset"]; ?>">

  18. zapperen

    zapperen New Member

    Nice guide!
    ISPConfig in norwegian is almost finished. Have to edit standard index files first.
  19. SCelik

    SCelik New Member

    I'm translating ispconfig to Turkish. Language & html files ok but how about database backend? When sorting in Turkish, some letters must be placed between c and d, h and j.. etc. So to do this, in db backend you have to use utf8 or latin5. i think utf8 fits all of us?

    why don't you code pages in utf8 charset and also set db charset..?
  20. digicon

    digicon New Member

    about translation

    hello everyone!
    i am new at ispconfig, now i have translate Isp config in japanese from english, i have already change all en.lng files by the direction from this forums, (i make jp.lng files )
    but the problem now i am facing is ,
    1. after completing translation including changing the charshet of changed it to UTF-8) , when i add client and login to that client management by browser, then nothing can be seen in browser.
    2.if i login by using Internet Explorer, the management tools doesnt reloaded,
    its give a massege like
    Ordner werden geladen....
    Loading folders....

    is that anything probelm of my setting over tranlating? or the charshet i have choosed for ispconfig (UTF-8) is not appropiate for the translation of ispconfig.
    on the other hand, the distribution is centos 5.1 ,and running over the kernel
    please give me some suggegsotion.

Share This Page