Page 1 of 1

HTML tag lang property

Posted: Mon Oct 13, 2014 3:25 pm
by matmattia
The html tag of Hesk is always:

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
The lang and xml:lang should change if is installed a translation (Chrome asks if I wanna translate a translated page).
For example, with the Italian translation the html tag should be:

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
I hope that this feature will be included in the next version of Hesk. Which variable I can use now to know the current language?

Re: HTML tag lang property

Posted: Mon Oct 13, 2014 3:45 pm
by Klemen
Good idea, thanks for pointing it out. Might be simpler to just remove it and let Chrome detect the proper language.

If the language folder name is a valid lang, you can try using

Code: Select all

$hesk_settings['languages'][$hesk_settings['language']]['folder']

Re: HTML tag lang property

Posted: Tue Oct 14, 2014 6:37 am
by matmattia
I edited line 39 of "inc/header.inc.php":

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $hesk_settings['languages'][$hesk_settings['language']]['folder'];?>" lang="<?php echo $hesk_settings['languages'][$hesk_settings['language']]['folder'];?>">