×
Kunena 5.1.18 Released (30 Jun 2020)

The Kunena team has announce the arrival of Kunena 5.1.18 [K 5.1.18] which is now available for download as a native Joomla extension for J! 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.

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

More
9 years 11 months ago #11 by Matias
Replied by Matias on topic Re: kunena.forum.css ?
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 11 months ago #12 by OfekA
Replied by OfekA on topic Re: kunena.forum.css ?

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 11 months ago #13 by Matias
Replied by Matias on topic Re: kunena.forum.css ?
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 10 months ago #14 by iLucato
Replied by iLucato on topic Re: kunena.forum.css ?
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 10 months ago #15 by ahmedfouad
Replied by ahmedfouad on topic Re: kunena.forum.css ?
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 10 months ago #16 by Cerberus
Replied by Cerberus on topic Re: kunena.forum.css ?
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 10 months ago #17 by ahmedfouad
Replied by ahmedfouad on topic Re: kunena.forum.css ?
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 10 months ago #18 by iLucato
Replied by iLucato on topic Re: kunena.forum.css ?

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
9 years 3 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
9 years 3 months ago #20 by avush96
Replied by avush96 on topic Re: kunena.forum.css ?
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.105 seconds