keskiviikko 2. maaliskuuta 2011

Googlebot, CookieLocaleResolver and default locale

Googlebot doesn't set a locale on request.

What does this mean? Well, in my case when I localized www.uutispuro.fi, googlebot only minded about english content. Even if I made different urls and sitemaps for webmaster tools.

Why such a behaviour? I'm using Spring's CookieLocalResolver, and ofcourse it had a default to en_US. This took a while for me to notice. Setting the default to "fi" does what I was expecting in the first place.


<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="defaultLocale" value="fi"/>
</bean>

Ei kommentteja:

Lähetä kommentti

Huomaa: vain tämän blogin jäsen voi lisätä kommentin.