×
Kunena 5.1.14 Released - Security release (13 Aug 2019)

The Kunena team is proud to announce the arrival of Kunena 5.1.14 [K5.1.14] which is now available for download as a native Joomla extension for Joomla 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.14. This update fixed 1 security issue.

Question Multilingual LTR and RTL sites. Load different kunena.forum.css files for each language

More
9 years 2 months ago #11 by Matias
I didn't check the code, I just corrected the bugs in it.

Yes, $this->language does not exist in Kunena 1.5 context.

I believe that you need to detect language because of RTL? This is how you do it.
$lang = JFactory::getLanguage();
if ($lang->isRTL()) {
  $document->addStyleSheet(KUNENA_DIRECTURL . '/template/default_ex/rtl.css');
} else {
  $document->addStyleSheet(KUNENA_DIRECTURL . '/template/default_ex/ltr.css');
}
The following user(s) said Thank You: OfekA

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #12 by OfekA

Matias wrote: I didn't check the code, I just corrected the bugs in it.

Yes, $this->language does not exist in Kunena 1.5 context.

I believe that you need to detect language because of RTL? This is how you do it.

$lang = JFactory::getLanguage();
if ($lang->isRTL()) {
  $document->addStyleSheet(KUNENA_DIRECTURL . '/template/default_ex/rtl.css');
} else {
  $document->addStyleSheet(KUNENA_DIRECTURL . '/template/default_ex/ltr.css');
}

Matias, I can't describe in words how much I thank you!
Works perfectly!

Now hours of css tweaking :D

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #13 by Matias
For the future: We really need someone to do RTL support for default template in Kunena 1.6.

If someone provides us css file for RTL (preferably containing only changes to default css) I would be glad to add buildin support for RTL languages.
The following user(s) said Thank You: ahmedfouad

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #14 by iLucato
Would somebody tell me what does LTR and RTL means?

Matias, if I understood the code above will change the css depending on selected language (joomla), right? But, if I want to use the same css for both, but I just want to call a different forum structure (forum/posts/threads) for each language?

Kunena 2.0.4 | 2013-01-18 [ Pharmacopoeia ], J!1.5.25, rhuk_milkyway, CB 1.8.1, AUP 1.5.13, UddeIM 2.5 and Akeeba Backup 3.3.9

EsferaDoBem.com.br | iLucato.com.br | BemDoado.com.br

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #15 by ahmedfouad
We need this feature and I know only miner things about CSS :( but i can help with the translation from English to Arabic:)

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #16 by Cerberus
LTR = left to right

RTL = right to left

LTR and RTL = the direction you read the word in

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #17 by ahmedfouad
Anther thing I want to add most of the templates providers now support RTL joomlart RocketTheme and many other when you have multi lang website (eng-ar) the template make changes to Kunena as well when I switch from LTR to RTL you must keep this in mind

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #18 by iLucato

Cerberus wrote: LTR = left to right

RTL = right to left

LTR and RTL = the direction you read the word in


Ah, it's better now. :0) Thanks Cerberus for the explanation.
Have a nice Sunday.

Kunena 2.0.4 | 2013-01-18 [ Pharmacopoeia ], J!1.5.25, rhuk_milkyway, CB 1.8.1, AUP 1.5.13, UddeIM 2.5 and Akeeba Backup 3.3.9

EsferaDoBem.com.br | iLucato.com.br | BemDoado.com.br

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #19 by TrueFact
This topic is a bit little old. But I managed to do this seamlessly without any problems or hard-coding anything.
JoomFish supports translating Kunena configuration. Luckily, one of these configurations is template name. I simply uploaded a localized template and named it "default-ar" went back to JoomFish, and translated the template name to my localized template. and Voila, it works like a charm.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #20 by avush96
Hi,
is this code good for 1.6? and where to put this code in order to call the RTL in case of switching between RTL and LTR??
please advice,
Avi

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.083 seconds