HTML tag lang property

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
matmattia
Posts: 8
Joined: Thu Jul 19, 2012 7:59 am

HTML tag lang property

Post 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?
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: HTML tag lang property

Post 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']
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
matmattia
Posts: 8
Joined: Thu Jul 19, 2012 7:59 am

Re: HTML tag lang property

Post 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'];?>">
Post Reply