Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
646 views
in Q2A Core by
edited by

As google search console refers

I want to define the language in my website which is non-English 

Where can I put this code 

<html lang="en">

Q2A version: 1.8.3

1 Answer

+1 vote
by

This attribute is displayed according to the language setting of the site. If you install additional French language addon and choose French for the language of your site, you will get the code you want.

Admin > General > Site language

However, if you want to change only lang attribute while the language of the system is in English, you will need to handle it with layer plugin.

by
That was just an example
I am using some non English languages like Persian and Arabic , and currently there is ability to change inside <head> tag only from the admin panel
while we need to add an attribute to <html> tag
Did you mean that no need to change any thing else after selecting the language ?
by
+1
Please ask a question accuratly.
In order to add code directly under html tag, we need to create a layer plugin.
https://docs.question2answer.org/plugins/layers/
https://www.question2answer.org/qa/57278/count-comments?show=57288#a57288

You can freely write code by overriding html() / head() / body() function in qa-include/qa-theme-base.php.
...