Google Update on May 17, and My Personal SEO Experiment on Mixing Languages

Hi everybody. I know, it’s been ages since I last published something on here. As some of you already know I have been very, very busy. Time flies without notice, and this website should become almost deserted in terms of number of visits. Shouldn’t it?

Paradoxically enough, that’s not been the case at all.

This is My Personal SEO Experiment

My blog visits are constantly increasing with me doing literally nothing. How can that be possible? The funny thing is that they’ve particularly soared in the last month. I guess because of Google’s most recent important updates: May 17, April 25 and March 8. Cool!

Today I just wanted to share with you the impact that my blog experienced because of those updates, which feels unexpected and funny at the same time.

And I also want to share an interesting SEO idea that I’ve been thinking over for a while.

A Multilingual Site with No Translations

So, in this scenario I’ve said “Let’s start posting in English too just to help my stats grow!”

By the way, did you know that so far I’ve been posting in Spanish only? I am so curious to see what happens while surfing this unexpected wave of visits by targeting a new English-speaking audience.

The important point is that I’m going to start writing my new posts in either English or Spanish without translating any content at all, as assuming that my readers are bilingual and can understand both languages – well, and also because it would take too much work to translate all the content.

Can you see my point?

Mixing Languages

This approach would be the same as a Swiss webmaster would take to create his/her site in German, French, Italian and Romansh, all together. And the same thing goes for a blogger who’s targeting bilingual English/French readers in Canada.

Again, the key aspect is that we don’t want to translate anything whatsoever.

You see, more specifically, in terms of my SEO strategy I’m just targeting a new English-speaking audience for my WordPress site, then surf the wave, and share with you all the results obtained in the future.

Taking a Simple Approach

Let’s be honest. There’s little information on the Internet about how to easily implement this SEO thing on WordPress. Technically speaking, the simplest solution is setting the lang attribute of the document’s html tag accordingly, for instance:

Or:

Easy peasy.

However, some bad news: no WP plugin out there will do the job for us in a snap. Just google the terms html lang wordpress or something similar and observe the results obtained…

Did you find any? Please let me know if so.

Well, there’s one plugin called Set HTML lang attribute per post that I wouldn’t personally recommend because it hasn’t been updated in two years, apart from the fact that is currently installed on about 30 web sites only.

Alternatively, you can give a shot to writing your custom PHP code in a similar way as described below:

But think a bit about it. Is it really worth it?

Be that as it may, at this point, rather than coding any PHP snippet to do the trick for us, why don’t we take a KISS approach consisting in using the lang attribute in our post’s content only, just to keep things simple?

This means specifying it in tags such as article, section, h1, h2, h3, h4, p, and whatever content tag, this way:

You see, my posts written in English will be wrapped in a <section lang="en"> tag. And the title will be wrapped in a <span lang="en"> tag as shown here:

This should work. You know why? Please keep on reading and learn how some search engines can automatically detect a particular web site’s language.

Automatic Language Detection to the Rescue

OK, let’s now read the following resource:

According to Google, it is the visible content of your page the one determining its language. Google doesn’t even consider the lang attributes of your HTML code.

Good!

Therefore, a bilingual website with no translations is not a problem at all to Google’s eyes as long as the page language is obvious to humans.

HTML’s lang Attribute

The above is true for Google, but what about other search engines?

Of course, not all search engines in this planet work the exact same way. It would be great that all of them could deduce the main language that a particular document is written in by looking at its visible content, as Google does, but chances are that this is not the case unfortunately.

So, in order for all user agents to support a site written in multiple, mixed languages it is necessary to use HTML’s lang attribute as described here by the W3C.

Conclusion

Today I’ve showed how to easily mix multiple languages on a WordPress site without translating any content at all. This approach is not widely documented, yet is perfectly valid in SEO terms (at least theoretically).

For instance, you might be interested in targeting an audience who’s OK with all the languages managed by your site – again, let’s give the example of a Swiss blogger who wants to combine German, French, Italian and Romansh, or an American one who writes his/her content in both English and Spanish.

In such scenarios there’s nothing wrong in displaying the main navigation bar in French, and then show the post in German since the targeted audience is supposed to feel comfortable with both languages.

Technically speaking, every single tag in any HTML document needs to be described properly with the lang attribute, which is a piece of cake to use. Just set the lang attribute of the document’s html tag once and you are done, bearing in mind that this is inherited by all other elements.

The bad news is that no WP plugin does the trick per post apart from Set HTML lang attribute per post, which seems to be deprecated.

So, rather than coding any custom PHP thing on your side, the easiest way to go is using the lang attribute in the HTML markup of those posts written in a different language than the default one, for example lang=en if it turns out that Spanish is the site’s main language.

And then see how search engines index the documents…

What About the Cons?

Okay. Let’s recap. All my posts written in English will be wrapped in a <section lang="en"> tag. Of course this solution is not ideal because the head tag is still inheriting the default language — which is set to es (Spanish) — as well as some other relevant tags will be inheriting the Spanish language by default.

But this is the simplest solution.

Note that at this point we are relying on user agents’ capabilities to deduce the main language of a document according to its markup. Google, for example, will be able to infer it by looking at the visible content as a human would do, ignoring the lang stuff. However other crawlers will rely on HTML’s lang attribute.

I’m sure you saw my point and I hope you liked today’s post. Either way, I’d like to highlight the fact that what I’ve explained today is merely experimental, and I am looking forward to see how my first post written in English will actually be indexed by crawlers.

Stay curious, and I’ll keep you posted on my experiment’s results. Thank you.

0 comentarios

¿Me dejas un comentario? ¡Gracias!

Deja un comentario

Los campos obligatorios están marcados con *