Support Multiple Languages in the Google Sitemap for TomatoCart

Some community users complained that the Google sitemap module only support the single admin panel language in the links.

When I’m creating a sitemap, it creates ONLY the English links in the sitemap.
Since I’m using a Hebrew translated system, I have 2 languages, and for Google, I need the Hebrew translation to be mapped in higher priority than the English. But in my case, I’m getting only the English links mapped.

missing_languages

In TomatoCart v1.1.8.5, if there are multiple languages in one store, the language code will be added after the products, categories and articles url. In this way, the search engine will index them separately. It will not result in duplication because the content linked to the url is different.

If you are using the old version rather than v1.1.8.5, you could improve the Google sitemap module via the following steps:

Step 1. Download the google_sitemap.zip

Step 2. Unzip it and you will see the following directories:

google_sitemap

You just need to copy the admin directory into the TomatoCart directory on your server. You have to override directories and files if your copy process request confirmation.

Note: if you modified the same files in the package, please don’t override them because it will impact your customization.

After that, please go to admin panel > start menu > tools > Google sitemaps module. You will see the following window:

sitemap

As you can see, you could select the language to generate your sitemap for each language:

1. Select the language to create the sitemap. After creation, a xml file for the language will be created in your TomatoCart directory. And it is added into the sitemapsIndex.xml. This xml file is main file for the search engine.

 If you are creating the sitemap for the English, the default xml file will be used to store the content. No new xml file will be created.

2. If there are multiple languages in one store, the language code will be added after the products, categories and articles url. In this way, the search engine will index them separately. It will not result in duplication because the content linked to the url is different.

For example:

<url>
    <loc>http://www.g1185.me/1-laptop/6-13-3-macbook-air-apple-z0fs0ll-a.html?language=en_US</loc>
    <lastmod>2013-08-13</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.5</priority>
</url>

    <url>
    <loc>http://www.g1185.me/1-laptop/6-13-3-macbook-air-apple-z0fs0ll-a.html?language=zh_CN</loc>
    <lastmod>2013-08-13</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.5</priority>
</url>

The final sitemapsIndex.xml will be looked like:

xml

Note:

  • Ensure your TomatoCart directory is writable to create the sitemaps for each language except English. After the creation, you should make it unwritable for the security.
  • Be careful with non-ascii characters in friendly URLs for products, categories and articles because they are not the standard characters for url. Only characters you can reliably use for the actual name parts of a URL are a-z, A-Z, 0-9, -, ., _, and ~. Any other characters may result in problem. So what does using an non-ascii character like space or å in a URL mean in practice?

Looking for quality TomatoCart Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + 6 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>