Jump to content

Issues with bilingual site. (rtl and ltr)


Recommended Posts

Thank you for your response.

Actually I use firebug and I change the css files. But when I change them right to left, the English is also right to left.

Could you please tell me how can I assign different css files to different languages?

I enabled the shop. Could you please check it?

Link to comment
Share on other sites

Try with this - edit header.tpl in your theme and add language iso {$lang_iso} as class to body 

<body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{$lang_iso} {if isset($page_name)}{$page_name|escape:'htmlall':'UTF-8'}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if $content_only} content_only{/if}">

Then you can add different css like 

body.en .container_9 .grid_5 {width:817px;direction:ltr;}
body.fa .container_9 .grid_5 {width:817px;direction:rtl;}
  • Like 1
Link to comment
Share on other sites

Not sure if you can do that fully.

You can try to have translation for right column text in Persian for both languages and similar for left column.

So use English to translate left column in Persian too.

But think that will not translate all, like product names and descriptions in columns, that comes from php.

And for css you can use

 #right_column {direction:rtl;}
 #left_column {direction:ltr;}

or something similar.

  • Like 1
Link to comment
Share on other sites

razaro, actually I have just enabled right column and I have deleted left column from the theme.

I find that I can change its position to the left side by changing the float attribute. But the problem is that when I do that for both En and Fa other components are displaced.

Do you know how can I change its position for each language by modifying css style?

 

Thanks a million,

Mojtaba

Link to comment
Share on other sites

Not sure what is an issue as your shop is in maintenance mode, you could add some screenshots that helps seeing a problem.

But think you have all that is needed just to combine css to specific case you want.

For example

 body.en #right_column {direction:rtl;float:left;}

 body.fa #right_column {direction:rtl;float:right;}

or direction:ltr for English, also try with !important 

 body.en #right_column {direction:rtl !important;float:left;}

 body.fa #right_column {direction:rtl !important;float:right;}

Not sue exactly what you want but again, some combination of those css should help.

Link to comment
Share on other sites

Thank you very much for your response.

I am trying to modify themese/mojtabatheme/css/grid_prestashop.css:20 and when I change the float from left to right, the column moves to the left of the page, and it is fine. But when I am going to use the combination body.fa and body.en before .grid_1 to 9, the menu moves down the page:




 

PS. I could not find how can I attach files here.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Making a theme RTL is more than changing some styles. you must flip everything in your theme in any page. for prestashop 1.5 create an rtl.css file in your theme folder and prestashop 1.6 read this topic: http://www.prestashop.com/forums/topic/364608-rtl-fundamentals-support-choices-and-help/

 

در صورت تمایل میتونید با شماره های موجود در سایت ما تماس بگیرید تا بیشتر راهنمایی بشید

Link to comment
Share on other sites

×
×
  • Create New...