Elxis CMS Forum

Support => Elxis 2008 developers guide => Topic started by: datahell on September 18, 2007, 21:30:07

Title: RTL and language files
Post by: datahell on September 18, 2007, 21:30:07
In Elxis 2008 you must define the language direction (right to left or left to right) in the gemini file.

define('_GEM_RTL', 0); //For left to right languages like english, itelian, greek etc

define('_GEM_RTL', 1); //for right to left languages like persian/farsi

You will see this addition in the new languages files. Just set it to 0 or 1 depending on the translated language direction.

Now for this constant to have effect you must use it in your template's index.php file.

Here is a general index.php template's file to have a guide:


defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$iso = explode( '=', _ISO );
$rtl = (defined('_GEM_RTL') && (_GEM_RTL == 1)) ? ' dir="rtl"' : '';
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'._LEND;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo _LANGUAGE; ?>" xml:lang="<?php echo _LANGUAGE; ?>"<?php echo $rtl; ?>>

The rest template follows...

Also note the _LANGUAGE constant witch is the language's 2 letter code (ie 'el' for greek, 'en' for english', 'fa' for persian/farsi, 'it' for italian, 'tr' for turkish etc). This provides xhtml/wcag compatibility.

Title: Re: RTL and language files
Post by: Farhad Sakhaei on September 20, 2007, 17:30:33
wow , thank you john , i wasn't see this post ...
in addition to include true compatibility for RTL direction , it needs to change more settings to apply RTL in ELXIS
such as:
- an image folder for right to left direction
- a css foder for it
- many hack for compatible RTL Direction for example menus on administration . preview of templates ...
- pathway image
- tiny mce
and another...
so if you want to include rtl in elxis , i can help you ...
Title: Re: RTL and language files
Post by: datahell on September 20, 2007, 18:42:39
I know that needs more changes. As a first step we made fully RTL compatible the Elxis installer (full RTL CSS support). Main Elxis will follow in a future version. The reason why this did not proceed in the current version is that we are very disappointed with what happened with Elxis in Iran... I hope in the future Elxis to have a more proper use there. In that case we will make it fully RTL compatible.
Title: Re: RTL and language files
Post by: Farhad Sakhaei on September 22, 2007, 10:50:15
ioannis , we talked about this before , i am so regretful , but please attention that in any place , may be there are some bad peoples and may be there are some pretty peoples , so about last ,  i think you saw only first group ...
i mentioned that subject in some popular iranian forums and many peoples in my country sentenced that work and they confirm their support from GNU/GPL and licensed softwares under that ...
you can see one of it , in this topic http://forum.majidonline.com/showthread.php?t=69449
this is a most popular forum in iran , and peoples who confirmed in this post , they are administrators of  some open source persian communities...like mambolearn.com , irannuke.com , nukeplatinum.ir , majidonline.com , other...
so please clear your bad memoir from your mind , i am sure that many peoples in my country love open source and it's rules and peoples who works on softwares under it...like ELXIS...