Installing Language Files

  1. Expand the language zip file, and upload the files to your server
    Or, upload the language zip file to your site's folder, and expand it there.

  2. Go to your Admin Control Panel Site Managememnt » Site settings, and select the appropriate language settings.

  3. Save the settings, and view the site.

Custom Language Files

  1. The Front-end & Admin panel are separate languages.

    • Front-end

      Copy the entire contents of "languages/en-us", paste that to "languages/your valid language code (i.e. fr-ca, de-lu)" [LIST]

    • Admin

      Copy the entire contents of "admin/languages/en-us", paste that to "admin/languages/your valid language code (i.e. fr-ca, de-lu)" [LIST]

  2. Re-name all file name occurrences of "en-us" to "your valid language code" and publish them to your server. (Use NO capital letters) For example, convert "languages/en-us/en-us.php" to "languages/de-lu/de-lu.php"

    The new language(s) will now be selectable in your Admin Control Panel Site Managememnt » Site settings. A browser refresh may be necessary.

    Select the new "Language Code Admin" and/or "Language Code", and [Save].

    After the page is saved, you will viewing the new language. This language will be in English, until you edit the texts in the new files.

  3. You will want to translate the following files

    • Front-end
      • languages/xx-xx/xx-xx.php
      • languages/xx-xx/xx-xx.js
      • languages/xx-xx/ini/(all ini files)
      • languages/xx-xx/modules/any php files found there
    • Admin
      • admin/languages/xx-xx/xx-xx.php
      • admin/languages/xx-xx/help.php (this file)
      • In addition, the payment agent(s) possess independent lang files at inc/lib/payment/pay agent/lang/en-us.php. They must be copied/pasted/published as: inc/lib/payment/pay agent/lang/xx-xx.php, and edited for language
  4. Editing Conventions

    · The line:         $lang['change_password'] = 'Change Password';
    would become: $lang['change_password'] = 'Changer mot de passe';
    · The line:         $lang['color_is'] = 'Color %d is %s';
    would become: $lang['color_is'] = 'Couleur %d est %s';
    The place holders "%s" and "%d" will be exchanged by php number and string variables at runtime. Resulting in:
    Couleur 2 est bleu

    · The order and number of placeholders ( %d & %s ) in each statement must be preserved.

    · The date and time formats may be changed at the bottom of the main language files.

    $dateFormat = 'n/j/Y'; // i.e. 2/18/2010
    $dateTimeFormat1 = 'n/d g:i a'; // i.e. 12/24 9:44 am
       To:
    $dateFormat = 'j/n/Y'; // i.e. 18/2/2010
    $dateTimeFormat1 = 'M/d H:i'; // i.e. Dec/24 00:44

     

  5. Problems?

    Check your text punctuation...

    · ['] = ['] as in Jack's, must be inserted as Jack's
    · ["] = ["] as in "Jack", must be inserted as "Jack"
    · [ã] = [ã] as in Jãck, must be inserted as Jãck

    · Check that each php code line ends with a ";" (semicolon)

    · Check your HTLM entity codes
  6. PHP coding

    To invoke the "LANG" class' public method "_":

    · Usage
      Assuming
    <?php    #file en-us.php
        $lang['some_name'] = 'Guy Kawasaki';
        $lang['hours'] = '%d hours';
        $lang['your_var_is'] = 'Your %s is %d';
    ?>

    <?php   
    $my_name = LANG::_('some_name');
    echo $my_name; // Guy Kawasaki

    $hrs = 22;
    echo LANG::_('hours', $hrs); // 22 hours

    $hrs = 6;
    echo LANG::_('hours', array($hrs) ); // 6 hours

    $var = 'age';
    $age = 16;
    echo LANG::_('your_var_is', array($var, $age) ); // Your age is 16

    echo LANG::_('some_unset_value'); // some unset value
    ?>

    Note: Not all language is translated at this time. i.e. js files and some html.

Some of the text still appears in English! What do I do?

Make sure you translate your pages, your menus, and your modules in the back end.
For example, if you have pre-installed page called "About us" that is your site's content, not something that can be translated from the back end. Be sure to create your own pages with your own language-relevant names and aliases - please see User's Guide that comes with your script for detailed instructions.