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.

CommentFileSizeAuthor
#27 xmlsitemap.module-182442-26.patch2.37 KBDarren Oh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rondev’s picture

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

Darren Oh’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Darren Oh’s picture

Project: Google Sitemap » XML sitemap
Version: 5.x-2.x-dev » 5.x-1.0
Component: Code » xmlsitemap
Darren Oh’s picture

Version: 5.x-1.0 » 5.x-1.x-dev
dennys’s picture

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

Darren Oh’s picture

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.

dennys’s picture

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 ?

Darren Oh’s picture

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.

mgifford’s picture

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

utentex’s picture

Priority: Normal » Critical

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 ?

PixelClever’s picture

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.

mr.j’s picture

Hi there, I created a separate issue for translated nodes not being included in a single sitemap:
#221555: Support for translated nodes

I believe this is a bug that is distinct from trying to have a different sitemap per language.

Jose Reyero’s picture

Subscribing.

I know i18n code but not this module's. Just in case you need some patch into i18n please, let me know.

avangelist’s picture

Priority: Critical » Normal

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?

Florian’s picture

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.

Bockereyer’s picture

Did you make sitemapindex.xml manually?

Florian’s picture

Yes. I have done this following the Google guidelines for sitemaps ... and works excellent .. at least, in the last year or so :)

attiks’s picture

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

Darren Oh’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Darren Oh’s picture

Status: Active » Closed (duplicate)

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.

Darren Oh’s picture

Status: Closed (duplicate) » Postponed

Accidentally marked a duplicate.

yaoweizhen’s picture

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

Darren Oh’s picture

It’s not allowed at the moment because we do not have a way to submit multiple site maps to search engines.

yaoweizhen’s picture

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

Darren Oh’s picture

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.

Florian’s picture

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 ...

Darren Oh’s picture

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.

Darren Oh’s picture

Assigned: Unassigned » Darren Oh
Status: Postponed » Needs review
Darren Oh’s picture

Status: Needs review » Fixed

Fixed in CVS commit 120353.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.