backend direction

إذا كان لديك أسئلة تتعلق بجوملا! ليست مرتبطة بالأقسام الأخرى قم بوضعها هنا

Moderators: sherif, General Support Moderators

Locked
mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

backend direction

Post by mossimo » Mon Mar 05, 2007 6:08 am

sorry i know all of you are arabic person i am not arabic but i would like to ask i download already the arabic language and it works but i hve a problem in the radio button is not working what i mean is in english i make i choose (YES) in my radio button(any radio button in backend) but when i make my languange arabic it appear i choose (NO).
I know i should make my backend to dir=rtl to appear it correct but also i should make it change also all the txt in arbic.
I add this to appear my backend RTL so it will support the arabic and also fix the radio button.
i know it will be fix in new version of JOOMLA 1.5...
But i would like to ask if somebody knows or much knowldge  about this things..i would like to add
the option in my index that when i change my languange in arabic & english there was an option also in BACKEND & frontend (INDEX.php)
the same as new joomla like this ( )

i hope somebody will help me!!!! THANKS  :)

User avatar
emakki
Joomla! Ace
Joomla! Ace
Posts: 1686
Joined: Fri Dec 01, 2006 9:26 am
Location: Centreville, Virginia
Contact:

Re: backend direction

Post by emakki » Mon Mar 05, 2007 7:40 am

First and quickest solution is to change the Yes to be "Yes" and No to be "No" in the Arabic language file.
Because they are written in Arabic they will display RTL which means the opposite. Just look for the Yes and No variable and change them back to yes  no.

The other solution I had is telling my clients (if they insist to keep it) that the Yes is on the right side, the second one or the one you think it's no!!

You may look for a RTL admin template which I tried some where but I do not advice because if you install the wrong template you may loose getting back to the control panel.
Tip: in case you changed the admin template and could net get back to admin, from ftp overwrite the folder of the new template name with files from the default template.

last but not lease, there is a code you can use:
There is a solution made by Dr_Drsh for the front end and am not sure if it will work for the back end but should check this link:
http://forum.joomla.org/index.php/topic ... #msg659721

Simply, make 3 php files one is index.php for the first login, index_rtl.php for Arabic and index_ltr.php for geting back to English.
Then put the code in the top of the templates. This code is if you have different templates for each direction.

If you are just interested in changing the direction then you can use this code:

Code: Select all

//If the lanague is arabic (Right to left) print rtl where you want it like on the <html> tag
if( $mosConfig_lang == 'arabic' )
       echo " dir=rtl";
//Otherwise ltr and you can ignore this and only check if it is in Arabic to have a dir attribute.
else
      echo " dir=ltr";

Pls, try and let us know. I am sure there are members who are better than me to explain by you can start with the above advice.

Good luck and welcome to Arabia!
Last edited by emakki on Mon Mar 05, 2007 7:46 am, edited 1 time in total.
Live and learn.. No matter what you earn..Money or knowledge.. From market or college..
_______
http://alhost.org هل تبحث عن إستضافة؟ مقارنة بين أفضل شركات الإستضافة
http://alhost.me دليل ومعاينة شركات الاستضافة العربية

mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

Re: backend direction

Post by mossimo » Mon Mar 05, 2007 8:17 am

thanks for helping me!ty for the link but i cannot read arabic... :)

Your 1st & second solution is not applicable to me. Your 3rd option is good but its not clear with me. bec the link you give me is arabic which i cannot undrstand. thanks .kinldy elaborate please...thanks again....

User avatar
drma
Joomla! Explorer
Joomla! Explorer
Posts: 339
Joined: Tue Jan 30, 2007 4:13 am

Re: backend direction

Post by drma » Mon Mar 05, 2007 10:20 am

I think you r using the Beta 1.5 .... there is a sticky about 1.5 template which says 1.5 templates based menus are broken.....about me im waiting 4 the new coming beta ...maybe they had fixed the bugg
Last edited by drma on Mon Mar 05, 2007 10:47 am, edited 1 time in total.
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65

User avatar
emakki
Joomla! Ace
Joomla! Ace
Posts: 1686
Joined: Fri Dec 01, 2006 9:26 am
Location: Centreville, Virginia
Contact:

Re: backend direction

Post by emakki » Mon Mar 05, 2007 10:31 am

Sorry for that,

I explained what was in the post and gave you the link as a reference to the code.
Again, what the post says is you make 3 files as I explained then you use the following code:

Code: Select all

//If the lanague is arabic (Right to left) load the (Right to left) version of the template
if( $mosConfig_lang == 'arabic' )
       include "index_rtl.php";
//Otherwise load the (Left to right) version.
else
       include "index_ltr.php";
This will load the proper template for each language (direction). As I said this solution if you want to change other things to suite Arabic or rtl stuff. If you wish to change only the page direction then choose the other option I gave you which is:
Like you requested the option to change the direction and you place this code exactly where you placed the dir="rtl" in your sample below in orange. So, the html tag should be like this:

Code: Select all

<?
if( $mosConfig_lang == 'arabic' )
       $theDir = " dir=rtl";
else
       $theDir = " dir=ltr";
?>
<html xmlns="http://www.w3.org/1999/xhtml" <? echo $theDir ?>>
I hope you got the idea and if you are into php some how, I think you can get it easily.

Good luck
Last edited by emakki on Mon Mar 05, 2007 10:34 am, edited 1 time in total.
Live and learn.. No matter what you earn..Money or knowledge.. From market or college..
_______
http://alhost.org هل تبحث عن إستضافة؟ مقارنة بين أفضل شركات الإستضافة
http://alhost.me دليل ومعاينة شركات الاستضافة العربية

mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

Re: backend direction

Post by mossimo » Mon Mar 05, 2007 3:46 pm

drma wrote: I think you r using the Beta 1.5 .... there is a sticky about 1.5 template which says 1.5 templates based menus are broken.....about me im waiting 4 the new coming beta ...maybe they had fixed the bugg

THanks for the reply no i am not using 1.5 version of joomla because it still in BETa stage i will wait to be the stable version before i will this this but i know it has a lot of feature that really support the arabic languange specially its writing direction..

mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

Re: backend direction

Post by mossimo » Mon Mar 05, 2007 6:07 pm

emakki wrote:

Code: Select all

<?
if( $mosConfig_lang == 'arabic' )
       $theDir = " dir=rtl";
else
       $theDir = " dir=ltr";
?>
<html xmlns="http://www.w3.org/1999/xhtml" <? echo $theDir ?>>
YEs sir its working now!!!THANKS SO MUCH!!! :D :D :D :D :D :D
:( :(but when i try to edit the xml files to translate also the parameters it was not arabic all appear ????? i already set the XML
sample of XML file i translate in arabic(not me the other person translate it for me! :D
joomla/administrator/components/com_content/content.xml

what the things i will be done i use utf not windows 1256...
THANKS!!!!!!!!!!!! :) :)

User avatar
emakki
Joomla! Ace
Joomla! Ace
Posts: 1686
Joined: Fri Dec 01, 2006 9:26 am
Location: Centreville, Virginia
Contact:

Re: backend direction

Post by emakki » Mon Mar 05, 2007 11:58 pm

I think am not following here. Are you saying the language file is corrupted? You can't read the contents?
Did you download the utf-8 Arabic language file s from the forge?

Well, from what I understand try to make sure that all is utf-8 the language files must be saved as utf and in the template it must be utf character set. If you happened to write something in windows-1256 then you use utf-8 you will see question marks in a black square like you saw.

Just make all encoding is in utf-8 may be even the english where you use the admin.

To find the Arabic translation for joomla in utf-8 please find it attached below.

I hope this solves your problem.

One last thing, make sure when you or anyone else translate something, they must save as utf-8 not ansi in notepad.
You do not have the required permissions to view the files attached to this post.
Last edited by emakki on Tue Mar 06, 2007 12:00 am, edited 1 time in total.
Live and learn.. No matter what you earn..Money or knowledge.. From market or college..
_______
http://alhost.org هل تبحث عن إستضافة؟ مقارنة بين أفضل شركات الإستضافة
http://alhost.me دليل ومعاينة شركات الاستضافة العربية

mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

Re: backend direction

Post by mossimo » Tue Mar 06, 2007 6:05 am

THANKS YOU ALL especially MR>EMAKKI
solve now the problem in XML yup when i view the text edit preference when i save the file it was not utf so i just change it to utf now the xml file was ok now i can view arabic now...thanks so much for all of you....
THE arabic community really great!
THANKS for the support!!!

ONE LAST QUESTION i already solve the dir and XML now read arabic but i would like to make 2 XML one for arabic and one for english..so the parameters in backend is also change the Languange its is possible?????

emakki wrote: I think am not following here. Are you saying the language file is corrupted? You can't read the contents?
Did you download the utf-8 Arabic language file s from the forge?

Well, from what I understand try to make sure that all is utf-8 the language files must be saved as utf and in the template it must be utf character set. If you happened to write something in windows-1256 then you use utf-8 you will see question marks in a black square like you saw.

Just make all encoding is in utf-8 may be even the english where you use the admin.

To find the Arabic translation for joomla in utf-8 please find it attached below.

I hope this solves your problem.

One last thing, make sure when you or anyone else translate something, they must save as utf-8 not ansi in notepad.
Last edited by mossimo on Tue Mar 06, 2007 6:17 am, edited 1 time in total.

User avatar
emakki
Joomla! Ace
Joomla! Ace
Posts: 1686
Joined: Fri Dec 01, 2006 9:26 am
Location: Centreville, Virginia
Contact:

Re: backend direction

Post by emakki » Tue Mar 06, 2007 11:53 am

mossimo wrote: THANKS YOU ALL especially MR>EMAKKI
solve now the problem in XML yup when i view the text edit preference when i save the file it was not utf so i just change it to utf now the xml file was ok now i can view arabic now...thanks so much for all of you....
THE arabic community really great!
THANKS for the support!!!

ONE LAST QUESTION i already solve the dir and XML now read arabic but i would like to make 2 XML one for arabic and one for english..so the parameters in backend is also change the Languange its is possible?????
Don't mention it man.. anytime drop by to say hi..

As for your question, I am not quite sure of what you mean. Can you explain further with location of files and samples. I think Dr. Drsh is an expert in such issues, he is a moderator here,  but if you explain further I'll be glad to try and help.
Live and learn.. No matter what you earn..Money or knowledge.. From market or college..
_______
http://alhost.org هل تبحث عن إستضافة؟ مقارنة بين أفضل شركات الإستضافة
http://alhost.me دليل ومعاينة شركات الاستضافة العربية

mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

Re: backend direction

Post by mossimo » Tue Mar 06, 2007 1:57 pm

:) :)
here's the explanation sir
i add this code in my index.php (ADMIN BACKEND)

>

so now the direction is rtl and also i want to have to arabic XML files like administrator/components/com_content/content.xml
so when i change arabic languange the parameters when i edit the content item the parameters is also arabic..
so i have 2 files for CONTENT.XML (located in administrator/components/com_content)
one arabic and one english..
Because when i change the DIR for index.php when i change my languange in arabic i should change also the languange for some XML files like my sample XML because some XML files has an RADIO button.
so i have suffering now how to detect the index.php what XML files he will going to used..
i hope you get my idea... :) :)
SORRY FOR THE ARABIC COMMUNITY for digging you about my situation....
THANKS :)

User avatar
dr_drsh
Joomla! Guru
Joomla! Guru
Posts: 585
Joined: Thu Sep 22, 2005 3:52 pm
Location: Egypt
Contact:

Re: backend direction

Post by dr_drsh » Tue Mar 06, 2007 2:36 pm

I'm afraid you can't have two XML files for the component "one for each language" simply because there's no way for the XML file to detect the current language, XML files are completely passive unlike php files (that's why the solution worked for index.php and won't work for content.xml).

I think you're trying to fix the "Yes -> No" problem in the Arabic administration backend,aren't you? I think this can fixed by the RTL'ing every part of the template's CSS setting every "text-align:left" to "text-align:right" and using the direction property.

If you're trying to translate the content component administration interface Then I'm sorry to disappoint you but there's no simple way of doing this.
http://mostafa.mosmar.com/blog | My blog
http://mostafa.mosmar.com/jforms | JForms - WYSIWYG Forms Component for J! 1.5 (Beta)

mossimo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 121
Joined: Tue Jun 27, 2006 8:13 am

Re: backend direction

Post by mossimo » Tue Mar 06, 2007 3:06 pm

yes sir i try to translate also the XML in administrator component folder  :( :( :( so i cannot change it in arabic SAD to here that....


Locked

Return to “القسم العام”