joomla template rtl switching doesn't work with sh404sef

370 Views Asked by At

In Joomla, using any 3rd party SEF component (sh404sef in our case) requires the language filter plugin to be disabled and here starts the dilemma of the RTL switching not working in RTL pages as most frameworks such as Gantry which is what we use, depend on that plugin being enabled for the switching.

ltr page: mobylak.com rtl page: mobylak.com/ar

On rtl pages, inspect element, it shows in the html tag:

<html lang="en" xml:lang="en" prefix="og: http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" slick-uniqueid="3">

when sh404sef is disabled and the language filter plugin is enabled it displays correctly as:

<html lang="ar" xml:lang="ar" prefix="og: http://ogp.me/ns#" slick-uniqueid="3">

and ofcourse if sh404sef is enabled along with the language filter plugin the /ar site breaks.

the only framework that we didn't get that problem with was Vertex but its not our preferred framework.

The Gantry template has a "less" folder which includes rtl.less and has a css-compiled folder which includes rtl.css, so what are we on the look out for to achieve the gantry template supported RTL switching whilst sh404sef enabled and language plugin filter disabled?

Thanks

1

There are 1 best solutions below

1
On

I wrote this javascript for automatic LTR-to-RTL conversion that might be helpful

https://github.com/urigoren/RTLjs