Problem with rtl text in multilingual site Topic is solved

General questions regarding the use of languages in Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
WilliW
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon May 22, 2023 1:00 pm

Problem with rtl text in multilingual site

Post by WilliW » Mon May 22, 2023 1:17 pm

Please see https://formularlotsen-bremerhaven.de

The main page - and only the main page - shall be available in multiple languages, one of which is Arabic. All other pages shall only be available in German. We installed the languages and a language switcher.

We had to create language specific main menus due to the first link "Startseite" linking to the language specific main page. All other menu items link to the German page which has language setting "all". If we set it to "German" it won't be found with the non-German menus.

Problem: When selected from the Arabic main menu, the German pages are displayed with right-to-left orientation. Also tables in banner and footer area are displayed with columns in rtl orientation.

Questions: How can we make sure that German pages are displayed ltr, irrespective of the menu item they were selected from or the actual language in the language switcher? In other words, the text orientation should only be depending on the article language, and the menu item language should not override the article language.

How can we make banner and footer area independent of the selected language?

Thanks for any advice.

Willi

WilliW
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon May 22, 2023 1:00 pm

Re: Problem with rtl text in multilingual site

Post by WilliW » Mon May 22, 2023 6:57 pm

I could solve the problem on my own.

I simply overrode the index.php in our Cassiopeia child template and removed the global dir attribute from the html element:

Old:

Code: Select all

<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
New:

Code: Select all

<html lang="<?php echo $this->language; ?>">


Post Reply

Return to “Language - Joomla! 4.x”