Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Set The Sitemap.xml To Indicate Alternate Language Pages Rate Topic   - - - - -

 
  • Jamalla
  • Advanced Member
  • Members
  • Join Date: 23-Sep 17
  • 123 posts

Posted 12 February 2018 - 01:56 PM #1

Hi,

 

Our website is multilingual site. The sitemap.xml is already generated for all of the pages, but the Google Search does not recognize that the website is multilingual.

 

According to Google Support, we should start the sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>http://www.example.com/english/</loc>
    <xhtml:link 
                 rel="alternate"
                 hreflang="de"
                 href="http://www.example.com/deutsch/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="de-ch"
                 href="http://www.example.com/schweiz-deutsch/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en"
                 href="http://www.example.com/english/"
                 />
  </url>

Reference:

https://support.goog...r/2620865?hl=en

 

** How can we set the sitemap.xml to indicate alternate language pages?

 

 

Thanks



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 387 posts

Posted 12 February 2018 - 04:01 PM #2

Hi,

 

Our website is multilingual site. The sitemap.xml is already generated for all of the pages, but the Google Search does not recognize that the website is multilingual.

 

According to Google Support, we should start the sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>http://www.example.com/english/</loc>
    <xhtml:link 
                 rel="alternate"
                 hreflang="de"
                 href="http://www.example.com/deutsch/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="de-ch"
                 href="http://www.example.com/schweiz-deutsch/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en"
                 href="http://www.example.com/english/"
                 />
  </url>

Reference:

https://support.goog...r/2620865?hl=en

 

** How can we set the sitemap.xml to indicate alternate language pages?

 

 

Thanks

 

Hello,

 

This is done by using alternate tags in the <head> tag. CS-Cart does this automatically. Take a look:

<link title="Nederlands" dir="ltr" type="text/html" rel="alternate" hreflang="en" href="https://intranet/nl/?sl=nl">
<link title="Deutsch" dir="ltr" type="text/html" rel="alternate" hreflang="en" href="https://intranet/de/?sl=de">
<link title="Italiano" dir="ltr" type="text/html" rel="alternate" hreflang="en" href="https://intranet/it/?sl=it">

Kind regards,


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17405 posts

Posted 13 February 2018 - 05:00 AM #3

You can change the fn_google_sitemap_get_content function (app/addons/google_sitemap/func.php). Check by HEAD SECTION


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Jamalla
  • Advanced Member
  • Members
  • Join Date: 23-Sep 17
  • 123 posts

Posted 13 February 2018 - 04:37 PM #4

Hello,

 

This is done by using alternate tags in the <head> tag. CS-Cart does this automatically. Take a look:

<link title="Nederlands" dir="ltr" type="text/html" rel="alternate" hreflang="en" href="https://intranet/nl/?sl=nl">
<link title="Deutsch" dir="ltr" type="text/html" rel="alternate" hreflang="en" href="https://intranet/de/?sl=de">
<link title="Italiano" dir="ltr" type="text/html" rel="alternate" hreflang="en" href="https://intranet/it/?sl=it">

Kind regards,

 

Many thanks ..

I checked the same in our website and I found it's not correct .. Do you have any idea how can I edit this part ? or it's okay to add it manually using and Head addon?

 

 

You can change the fn_google_sitemap_get_content function (app/addons/google_sitemap/func.php). Check by HEAD SECTION

 

Many Thanks for you reply.

This option edits the sitemap file in the code .. I am not sure how can I do this .. I checked the code and it's like not a static code .. the tags are generated dynamically ..



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 387 posts

Posted 13 February 2018 - 04:38 PM #5

Many thanks ..

I checked the same in our website and I found it's not correct .. Do you have any idea how can I edit this part ? or it's okay to add it manually using and Head addon?

 

 

 

Many Thanks for you reply.

This option edits the sitemap file in the code .. I am not sure how can I do this .. I checked the code and it's like not a static code .. the tags are generated dynamically ..

 

Hello, 

 

What do you mean with 'it is not correct'? Please tell me what is incorrect about the tags.

 

Kind regards,


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17405 posts

Posted 14 February 2018 - 05:04 AM #6

 

Many Thanks for you reply.

This option edits the sitemap file in the code .. I am not sure how can I do this .. I checked the code and it's like not a static code .. the tags are generated dynamically ..

 

As you can see, header is static there. So you can edit it. Unfortunately function does not have hooks and it cannot be extended by addon


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Jamalla
  • Advanced Member
  • Members
  • Join Date: 23-Sep 17
  • 123 posts

Posted 15 February 2018 - 10:56 AM #7

Hello, 

 

What do you mean with 'it is not correct'? Please tell me what is incorrect about the tags.

 

Kind regards,

 

Many thanks for your reply.

 

In our website we have two languages; Arabic and English. The English is the default ..

But the Arabic alternate tag points to the English page as follows:

<link title="العربية" dir="trl" type="text/html" rel="alternate" hreflang="ar" href="https://website-domain/en/?sl=ar">

The issue now that our Arabic Home Page in not indexed with Google ..



 
  • Jamalla
  • Advanced Member
  • Members
  • Join Date: 23-Sep 17
  • 123 posts

Posted 15 February 2018 - 11:12 AM #8

As you can see, header is static there. So you can edit it. Unfortunately function does not have hooks and it cannot be extended by addon

 

Thanks dear friend for your reply.

 

The issue now that our second language Home Page in not indexed with Google ..

I think I need to work in this part of the sitemap, so second language url can be deducted.