When using a paragraph in a foreign language, should I use the lang= attribute for SEO?

I understand that the doctype at the very start of any page has this attribute:

<html lang="en-US">

This is obviously language-specific.

What I am wondering is, rather than create multiple pages for different languages, can I just simply add this HTML attribute:

<p lang="hi">नमस्ते</p>

“hi” is the language code for the Hindi language.

So, is my approach a good one? I just need a paragraph in Hindi, that’s all. 90% of the HTML doc is in English – but just wondering about the correct “SEO” for that.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

Yes according to the World Wide Web Consortium (W3C) documentation you can include the main language for your document and declare another language for a specific element of the page. Here is the documentation. So the example you gave would be correct.

<html lang="en-US">

<p lang="hi">नमस्ते</p>

However, if you have SEO in mind and want to rank that page for Hindi-speaking users, you might have problems to rank high as other competing pages might have better signals (title of the page, headers, internal links, external links) to rank for those Hindi terms.

Solution 2

You are saying that you just need a paragraph in Hindi, that’s all. Then creating multiple (or just one) pages for different languages would be the wrong way to go. Adding your one (or many) paragraph and marking it through the lang attribute, is the right way and it will not impact negatively on SEO.

Solution 3

Googlebot ignores the lang= attribute in HTML. It is fine to use it, and the W3C recommends it, but it won’t do anything for SEO.

Google automatically identifies the languages used in your pages based on the words. You don’t need any special markup to tell Google about which languages you use.

You should not mix two languages in the same page if at all possible. Google recommends creating separate URLs for content in separate languages. Mixed language pages are generally not good for users because it requires that your users understand both languages, and not that many users are bilingual.

A paragraph in another language could be OK if that paragraph were then translated or explained in the page in English, or if you are sure that almost all your users can read both languages.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply