Assume this scenario: I am developing an educational website with some courses, hypothetically. Each course has a landing page or main page or something like that.
In this website, users can choose their preferred language for navigation (buttons, menus, etc.), but on the other side, I don't like to force them to only watch and learn courses in that specific language. As an example, I would like to set my preference for navigation, the English language, but since I know and speak Farsi, I want to filter courses in a way that I can see those as well, so I wouldn't miss anything.
There are some well-known practices as Google says to handle multilingual/multi-regional sites.
1. subdomains, e.g.,
2. sub-directories, e.g.,
3. top domains, e.g.,
example.ir (not my option due to costs)
4. sessions, cookies, etc. (May seem bad but may be good in my scenario)
Now further, assume the following scenario. (I was searching for hours for some good advice, but I couldn't find any, I hope it will help people in the future as well.)
Assume that we have a page called
example.com/courses/seo-for-begginers-in-farsi, while the content is Farsi, the user may like to see the navigation menu in English.
So if the user set the language to English, he would expect the URL to be something like
en.example.com/courses/seo-for-begginers-in-farsi and NOT
fa.example.com/courses/seo-for-begginers-in-farsi. But doesn't it confuse the crawlers and search engines? I mean the navigation is not important at all (even should be avoided for indexing).
Here is my first question that how can I tell Google and other guys that my content is in Farsi (The
lang property should be set to
fa) but tell the user that you are visiting the English version of site. Also another problem would be the almost identical pages I believe that can be handled using
canonical meta tag but I'm not sure.
First Question: My Solution
My solution at this point is to store the navigation language in users preference and set the page language to match its content, avoiding the robots & crawlers confusion. This way I wouldn't be worried about identical pages with different URLs as well. But I'm not sure if it's the best practice regarding users and Search Engines.
The next problem that comes is the pages with actually multilingual content. for example the very landing page of the site (e.g.
example.com). If I use the practice I just mentioned, it would be again confusing for search engines because I am having the same URL but I want the Google (and others) to index it in different languages with different contents (based on IP region or something), which I believe, is impossible.
Second Question: My Solution
The best practice I could think of is to use the same session stuff but think of the landing page as an exception. we may have
example.com/en, etc. with different content, but for other pages, we omit the language indicator in the URL and just use the cookies. The problem with this solution would be that it seems kinda dirty and unsophisticated.
The next problem that comes in mind is if we want to serve actual multilingual content. For example similar to what Wikipedia does. We may have an official course about SEO, that comes in two lanugages, Farsi and English. The way wikipedia handles it is that the navigation and content are always in the same language. You may not read a Chinese article while having English menus and buttons, but as I said, it would be a very nice thing if we could have this feature.
Third Question: My Solution
lang attribute to content language, and provide some
meta but I'm not sure how it's done.