Setting the language tag in WordPress
And why is it important?
Understanding language tags
The HTML lang attribute should be used on every webpage to identify the language of the content on the page.
It is referenced by search engines to enable them to search for results in specific languages and as such it underpins multilingual SEO, returning only local language results back to search engine visitors.
It is also used by assistive technologies such as screen readers that switch language profiles to provide the correct accent and pronunciation when reading the content from the page to visitors with impaired sight, and so is essential for those visitors to understand the page as it is read to them.
Do you need to do this?
If you have a website that is supporting multiple languages through a single domain – for example using a subdirectory to indicate the language such as https://www.purefluent.com/es – then it is possible that the translation plugin you are using with WordPress is managing the tag for you.
However, if you have setup multiple instances of WordPress across multiple domains – for example your domain for Spanish might be set to https://es.purefluent.com – then you should check that the language has been set correctly.
In either case you should check the source code for your web page to ensure that the language has been set correctly.
The first two lines of the code will look something like this:
<!DOCTYPE html> <html lang="en-GB">
The language is set in the <html> tag as the “lang” attribute and it needs to reflect the language or locale you are targeting with this page.
So what should I set it to?
Our creative translation services:
- Offer you the ability to preserve your brand identity while reaching your audience in their own language, and in a culturally appropriate manner
- Make sure your content is relevant to your audience in each target market
How do I set this in WordPress
WordPress is a very easy to use CMS and is powering nearly nearly 15% of all websites in the world as of 2021, so as you would expect setting the language has been made very easy and will only take a minute to accomplish.
To get started log into the administration panel for your WordPress installation.
On the left hand side menubar click on Settings, then General