languages templates Developer Jahia 7.3 Jahia 8

Adding lang tag in template


How could I add the lang attribute in my HTML tag?  I want to add the language of the text in an attribute based on the current language                                                                            

<html xmlns="" lang="en">



The lang attribute specifies the language of the element's content.
To use the current language of your site, simply do this in your template:

<c:set var="language" value="${renderContext.mainResourceLocale.language}"/>
<html xmlns="" lang="${language}">