*

mhdimad

  • **
  • 5 posts
CSS Style related to language - RTL and LTR
« on: March 29, 2016, 10:38:20 AM »
hello
I have (zara) theme, and I add the Arabic language on the site
I modified the files Style,( style.css ) (responsive.css) (tabs.css)I changed (float:left to float:right) And renamed files to
( style_rtl.css ) (responsive_rtl.css) (tabs_rtl.css) And keep the original files Style in the same folder.
I need a PHP Code, to choose CSS rtl files when choosing the Arabic language, and refer to the original CSS files when you return to the English language
« Last Edit: April 29, 2016, 01:35:28 PM by frosticek »

*

MB Themes

Re: how to change style css when change language
« Reply #1 on: March 29, 2016, 04:39:05 PM »
@mhdimad
Go to file:
oc-content/themes/zara/head.php

Find line:
Code: [Select]
osc_enqueue_style('style', osc_current_web_theme_url('css/style.css'));
Replace it with:
Code: [Select]
if(osc_current_user_locale() == 'en_US') {
  osc_enqueue_style('style', osc_current_web_theme_url('css/style.css'));
} else {
  osc_enqueue_style('style', osc_current_web_theme_url('css/style_rtl.css'));
}

In code above you may need to change en_US to locale code you need for english (or left-to-right) langugage.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mhdimad

  • **
  • 5 posts
Re: how to change style css when change language
« Reply #2 on: March 29, 2016, 09:41:02 PM »
thank you very much :) resolved problem

*

MB Themes

Re: how to change style css when change language
« Reply #3 on: March 29, 2016, 09:46:40 PM »
@mhdimad
Cool ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

crymatisticos

  • ***
  • 57 posts
Re: CSS Style related to language - RTL and LTR
« Reply #4 on: May 17, 2017, 10:52:31 AM »
hello
I have (zara) theme, and I add the Arabic language on the site
I modified the files Style,( style.css ) (responsive.css) (tabs.css)I changed (float:left to float:right) And renamed files to
( style_rtl.css ) (responsive_rtl.css) (tabs_rtl.css) And keep the original files Style in the same folder.
I need a PHP Code, to choose CSS rtl files when choosing the Arabic language, and refer to the original CSS files when you return to the English language

Hi @mhdimad
can you share your CSS styles please

*

alsharif

  • ***
  • 48 posts
Re: CSS Style related to language - RTL and LTR
« Reply #5 on: June 23, 2017, 01:03:43 AM »
Will you kindly share ( style_rtl.css ) (responsive_rtl.css) (tabs_rtl.css).  And if possible the Arabic translation for Zara Theme (theme.po).
Thanks in Advance
« Last Edit: June 23, 2017, 02:09:47 AM by alsharif »

*

atomo

  • **
  • 12 posts
Re: CSS Style related to language - RTL and LTR
« Reply #6 on: November 02, 2018, 11:58:44 PM »
Unless in case of a complete styles rearrangement, I think is better not to touch the original stylesheets and create a custom.css file. Then we just need to insert a line of code on head.php, in the block starting line 58:

Code: [Select]
osc_enqueue_style('custom', osc_current_web_theme_url('css/custom.css'));