Some of people here are asking how to change the language code dynamically when ever you have a multilingual site, and when the language is changed, the main language of the document, should reflect that change on the opening HTML tag like.
Go to templatesyour_template_nametplsdefault.php to make the following modifications…
<html lang=”en-GB”>
The best way to do that, would be by using a Joomla API that identifies what language your site was set for and than it changes automatically by using the following code
[PHP]
<html lang=”<?php echo $this->language; ?>”>
[/PHP]
As you can see, the PHP code watch for the language that the site is set for and return to the code, the appropriate value