XML sitemap and HREFLANG

Popular automatic website translation tool

XML sitemap and HREFLANG

Postby encodia » Sat Sep 17, 2016 8:40 pm

Hi there,

I would like to add a meta hreflang on our websites using gTranslate. And I'd like to add an XML sitemap too.

May you help us? Do you have any "ready to go" solutions?

We can develop our own plugin... but we can't find a documentation with method or API. For example:

what about the right way to get all available languages? And what about the right way to get translated url, giving a post?

Thank you

Davide
encodia
 
Posts: 2
Joined: Sat Sep 17, 2016 8:37 pm

Re: XML sitemap and HREFLANG

Postby Yana » Sun Sep 18, 2016 12:19 am

Hi
I wouldn't suggest playing with hreflang. Please read all the documentation available from Google. It may cause SEO issues if used incorrectly.
We do not translate xml sitemaps and other XML documents. There is no need to create sitemap.xml for translated languages. You can create sitemap.html page like on oue website and submit the URL to search engines.
You can find GTranslate documentation here https://gtranslate.io/docs.
You can find supported lnguages list here https://gtranslate.io/faq
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4547
Joined: Thu Jan 12, 2012 6:21 pm

Re: XML sitemap and HREFLANG

Postby encodia » Sun Sep 18, 2016 11:22 am

Hi Yana,

I did mean: "how to get the available activated languages list", through PHP and WordPress hook. Not the supported languages list available on your FAQ page.

I would like to use correctly (hope) hreflang meta tag, why did you not suggest this best practice?
encodia
 
Posts: 2
Joined: Sat Sep 17, 2016 8:37 pm

Re: XML sitemap and HREFLANG

Postby Yana » Sun Sep 18, 2016 10:45 pm

Hi,
You can find the current selected language code from X-GT-Lang request header. With PHP you can find it in _SERVER['HTTP_X_GT_LANG'] variable.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4547
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests