Joomla multilingual site HTML tag attributes don't change after install k2 component 2.10.3

211 Views Asked by At

I found a problem in the "System - K2" plugin in version 2.10.3. When the "System - K2" plugin is enabled, if the site is multilingual, the language attributes ("lang" and "dir") that appear on the HTML tags, don't change and only the default language attributes will be displayed.

I checked the version 2.10.2 and everything is ok.

Please note that it does not matter if you use the K2 component or not; just install K2 to see this issue.

Please help and let me know what can I do?

1

There are 1 best solutions below

1
On BEST ANSWER

We found the same problems with all our Joomla Sites running K2 - the language seems to be decided by browser language instead of page language if K2 is installed.

As a workaround we've changed the output in the template index.php to use JFactory instead:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo strtolower(JFactory::getLanguage()->getTag()); ?>" lang="<?php echo strtolower(JFactory::getLanguage()->getTag()); ?>" dir="<?php echo $this->direction; ?>">

This works, however we hope K2 will fix this bug at some point.