I am running a pretty big company website that uses multiple languages so users can browse the website in their language. Lately i have been working on the Search Engine Optimalisation, and i noticed google (and some other crawl bots) do not correctly crawl the other languages, this had something todo with various reasons :
- language selection was saved in session or by $_GET argument
- meta language tag was not always set
- there was no clear line how the language was selected, user couldn’t see by url which language he selected
I did a few lookups on the internet, some various SEO forums, and i’ve collected this information and, with the help of Apache mod_rewrite, turned the website into a fancy, easy-to-use, multilanguage environment, and this is how i did it. I will explain you in 3 different parts, which i will try to finish in the upcoming 3 days….
To start off i am using .xml files to hold all the different language strings, nowadays you can find some php frameworks that fully support i18n, but back in the days i was making international websites, they were not that commonly available. If you would go for a framework i would choose Mojavi, Prado or Symfony, i am not going to elaborate on that, as this post is not about frameworks, but howto put different languages on your website, and making sure google (and other search engines), crawl em like they should….
Start off by making sure you have a google sitemaps account and have a way to gather website statistics, very good would be a package where you can list the crawl bots seperately (i prefer awstats)
Sitemaps what/where went wrong when crawling your site. The Google Sitemaps program has two major components:
- Google Sitemaps Console: Provides statistics and error information about your site, as well as tools for managing your site.
- Google Sitemaps files: Enable you to tell us what pages are present on your site.
I’ll leave you the time to make sure you have both of the above items + it’s a really nice excuse to stop writing and do something else…Part II soon…