html lang tag shows always the same

Permalink 1 user found helpful
Hi, sorry but you may find this a silly question. I´ve got a site that uses internalization addon, and html lang tag always shows the same code for the different languages.

I´m using this code in template headers
<html lang="<?php  echo LANGUAGE?>">


And I always receive this even on english section
<html lang="es"...


Also i´ve got installed the spanish pack to translate the dashboard, and i have noticed that changing default language always force the html lang tag to the language selected. Is it possible that the package could be interfering with the internacionalization add-on? Is there a way to obtain the right code?

You can find the site working here:http://www.tufabricadeventos.com...

Thanks in advance

thenine
 
Remo replied on at Permalink Reply
Remo
did you specify anything related to languages in config/site.php?
Nomoreglitches replied on at Permalink Reply
Nomoreglitches
Hi Remo,

I run into the exact same problem with my German/English website. All html tags show lang = "en" even when I switch to German. I saw that there is an older thread reporting a similar issue but there is no final answer.

http://www.concrete5.org/marketplace/addons/internationalization/fo...

Even if I change the default language to German, lang = "en" will remain...

Are there any news on this issue?
Thanks a lot in advance!
tallacman replied on at Permalink Reply
tallacman
I just checked this page from Reno NV USA and it came up correctly:

<!DOCTYPE html>
<html lang="es">
<head>
thenine replied on at Permalink Reply
thenine
Do you have a second language installed for interface translation? If so, try desinstalling it. In my case this second language was forcing the lang tag. Desinstalling it solved the issue without any other code injection.

Regards,
nebuleu replied on at Permalink Reply
nebuleu
When I was facing this problem, i solved it by adding this code in my header :

<?php
$multilingual = Package::getByHandle('multilingual');
if ($multilingual) {
  $lh = Loader::helper('section', 'multilingual');
  $lang = $lh->getLanguage();
} else {
  $lang = LANGUAGE;
}
?>
<html<?php echo ' lang="' . $lang . '"'?>>
Nomoreglitches replied on at Permalink Reply
Nomoreglitches
Thank you thenine and nebuleu.

I have only one language for the interface so this was not my case. I realize that in most of the themes there is a static language definition either in the default.php or in the elements/header.php of the theme: <html lang="en">. Replacing it with nebuleu's code that reads the language dynamically from "multilingual" did the trick for me.
nebuleu replied on at Permalink Reply
nebuleu
Oups, thanks, I have fixed the typo error in my post.
wvanelten replied on at Permalink Reply
Thank you!!!
This is the solution I was looking for.