sitemaps for each language - i18n
dsp1 - October 10, 2007 - 21:18
| Project: | XML Sitemap |
| Version: | 5.x-2.x-dev |
| Component: | xmlsitemap |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Darren Oh |
| Status: | closed |
Description
yes, please add the feature to have a sitemap for each language.
since only english nodes shows on the sitemap and not the other languages.
also Drupal 6 has the languages as core so it would be good to add this now.
thanks.

#1
I'm here just to say that this is a feature I would like to have too. I don't how to help as I don't have the required level to. The only thing I can do is to create the fr.po file of this module. That would be my contribution.
Please a sitemaps for each language with i18n.
Ronan
#2
#3
#4
#5
Does this module generate sitemap data from url_alias table ? Because I already put the language prefix (i.e. en/node/xxxx, zh-hant/node/xxx), but when I use browser to see http://xxx.xxx/en/sitemap.xml or http://xxx.xxx/zh-hant/sitemap.xml, the url in the sitemap doesn't contain the language prefix.
sample: http://dennys.tiger2.net/en/sitemap.xml or http://dennys.tiger2.net/zh-hant/sitemap.xml
#6
i18n was adding the language prefix to every URL, so we use i18n_get_lang_prefix() to get the URL without a language prefix.
This will be the situation until someone who knows the i18n code well provides a patch that can ensure that only the appropriate links have a language prefix, or can split the languages into separate site maps.
#7
I tried to remove remark the 3 lines
// if (module_exists('i18n')) {// i18n_get_lang_prefix($result, TRUE);
// }
test 1:
1. I delete files/sitemap.xml.gz
2. Open http://dennys.tiger2.net/zh-hant/sitemap.xml
3. I see the url with prefix "zh-hant"
test 1:
1. I delete files/sitemap.xml.gz (in order to regenerate it)
2. Open http://dennys.tiger2.net/en/sitemap.xml
3. I see the url with prefix "en"
I think the url is correct and include the language prefix. The problem is we can use only one sitemap. Is it possible to use seperated sitemaps for different languages ?
#8
That's the point of this issue. Also, every URL including the home page must include the language prefix, or the site map will be rejected by Google.
#9
This is an important issue for me too. I'm also think that either yahoo or google gave me grief with the /en/sitemap.xml, insisting that the sitemap.xml be on the root directory. Will need to look into this more, but not sure how sitemaps are supposed to work with multi-lingual sites. There wasn't much on languages here - http://www.sitemaps.org/faq.php#faq_http_vs_https
#10
i'm interested in separated sitemaps for different languages too.
the problem is for google;
and it's critical :(
an example:
if i add or edit an italian node, the module xml_sitemap generates a sitemap.xml with only italian nodes and no lang nodes and submit it to google
and when i add or edit an english node it do the same for english node;
the effect it's that google somethhimes see italian nodes and sometimes see english nodes but never all together, so he have to do changes avery days and i think this urts google in pagerank calc
anybody knows a solution ?
#11
How many of you would be willing to put some money towards a bounty to get this fixed? I already paid out one bounty towards the same problem and I thought that it was fixed but then when I added pages in two other languages I realized that nothing is showing up except for the english versions. I would be willing to put some money towards it again, and if we get enough people together maybe we can get a programmer to notice that knows how to do it.
#12
Hi there, I created a separate issue for translated nodes not being included in a single sitemap:
#221555: i18n & localizer: translated nodes not included in sitemap
I believe this is a bug that is distinct from trying to have a different sitemap per language.
#13
Subscribing.
I know i18n code but not this module's. Just in case you need some patch into i18n please, let me know.
#14
We would very much like to see this happen as we are working on an i18n project with another organisation to be able to deliver multi-lingual sites with an automated translation process with V.6
Perhaps in a few months time we can work assist with the i18n parser issues?
#15
Using a sitemapindex.xml is probably the best way. I have done this (http://www.puzzle.ro/sitemapindex.xml) with multisite approach for translated content. This should be done for multilanguage sites as well.
#16
Did you make sitemapindex.xml manually?
#17
Yes. I have done this following the Google guidelines for sitemaps ... and works excellent .. at least, in the last year or so :)
#18
subscribing, the patch in http://drupal.org/node/221555 is working for me, but it generates one big file (which is OK for me)
Peter
#19
#20
With the 5.x-2.x code, it would be easy to generate site maps for each language. However, submitting all the correct site maps to search engines would still be a challenge.
#21
Accidentally marked a duplicate.
#22
I have intalled the 5.x-2.x-dev and i18n, the link http://www.example.com/sitemap.xml and http://www.example.com/cn/sitemap.xml is allways same content. How to genarate multi sitemap file for each language.
thanks
#23
It’s not allowed at the moment because we do not have a way to submit multiple site maps to search engines.
#24
On my multi language site, i modified the xmlsitemap.module code slightly. The code that generating sitemap.xml.gz, i modified to "sitemap".i18n_get_lang().".xml.gz". It can be separated sitemap file. e.g. sitemap.en.xml, sitemap.cn.xml .... The link is still the sitemap.xml, but the linked real file is different. e.g. http://www.example.com/sitemap.xml
#25
There is no problem with generating site maps for each language. I just don't want to deal with a flood of bug reports from people who discover that only one of their site maps is being submitted to search engines.
#26
They should put a sitemapindex.xml in the root of the website, like:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.puzzle.ro/sites/all/modules/gsitemap/gss.xsl" ?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">
<sitemap>
<loc>http://www.puzzle.ro/en/sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>http://www.puzzle.ro/ro/sitemap.xml</loc>
</sitemap>
</sitemapindex>
... and submit this file to search engines, instead of single sitemap.xml. Everything will work as expected.
It seems that thee last version of xmlsitemap module for Drupal 6 does not output separate sitemaps per language ...
#27
That's a good suggestion, but as no patch was included, I am submitting a patch for testing that adds links with language prefixes but leaves all links in one site map.
#28
#29
Fixed in CVS commit 120353.
#30
Automatically closed -- issue fixed for two weeks with no activity.