Forum Archive - XML sitemap and HREFLANG

XML sitemap and HREFLANG
Sep 17, 2016 4:40 pm by encodia
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
Re: XML sitemap and HREFLANG
Sep 17, 2016 8:19 pm by Yana
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 You can find supported lnguages list here
Re: XML sitemap and HREFLANG
Sep 18, 2016 7:22 am by encodia
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?
Re: XML sitemap and HREFLANG
Sep 18, 2016 6:45 pm by Yana
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.


No Self Referencing hreflangMar 12, 2018 2:14 pmReplies: 1Post by: JLoehr
HreflangMay 18, 2017 4:22 pmReplies: 1Post by: union
Hreflang TagApr 26, 2017 10:54 amReplies: 1Post by: sureshven
Google Webmaster tools hreflangDec 21, 2015 5:35 amReplies: 1Post by: bahab
Google Webmaster tools hreflang QuestionNov 10, 2015 12:00 pmReplies: 1Post by: atlasweb

Try GTranslate with a free 15 day trial