Login






Multi-lingual

How to add additional language ?

  1. After creating a new language in Admin Panel > Languages, visits Main Config (still in Admin Panel), press “save” again (language merging to the new language file will occur when config is saved)
  2. In /[THEME_PATH]/lang/
    Duplicate folder “EN” and then rename it to the newly created language code. Edit the *.php inside that folder.

Advanced handling for additional language ?

If you need totally different layout for different language, you can use one of the 3 ways as follows: e.g. For Arabic language, which is "right to left" text-alignment, which is different from English (left to right text-alignment)

1) Load css file for AR language

If the language = Arabic, additional load a "main-AR.css" which contains css class for the "text-align to right".
Steps:
edit:
  • /load.css.php
BEFORE:
include dirname(__FILE__).'/main-color.css';

ADD:

if ($_SESSION["LANG"] == 'AR'){
include dirname(__FILE__).'/main-AR.css';
}

Then, you can create "main-AR.css" and put it in the same place as "main.css".

Note that "AR" is the language code you assigned to Arabic language in Admin Panel > Languages


2) Use IF ELSE statement inside the template.

You can use IF logic to write code for AR language:
if ($_SESSION["LANG"] == 'AR'){
xxx
}else{
xxx
}
Note that "AR" is the language code you assigned to Arabic language in Admin Panel > Languages


3) Create a separate theme for AR language


Since Jamit Job Board allow you to assign different languages to different themes, you can simply duplicate folder "/nasthon1007" as "/nasthon1007-AR", and then assign it to language AR in the admin panel.

You can modify "/nasthon1007-AR" as you like to fit for AR language without affect the theme for English.

Note that this will increase your maintanence workload because you need to maintain (or upgrade in the future) 2 templates.