On Mar 22, 2011, at 08:16, DigitalDude wrote:
> half an hour ago I implemented a redirect to a link with the language
> code based on the session language when no language code is given by
> the url. So instead of displaying the view for www.domain.com, I check
> in the controller if a language is given by a passed-argument and if
> not, I redirect them to www.domain.com/it for the italian version.
> 
> But I don't think this can solve the problem. When the Google Bit
> cannot start a session there will always be english as the default
> language, and so even now he would be redirected to www.domain.com/en
> and no other languages will be checked.

So the problem is how to get Google to realize that URLs with other language 
codes (like www.domain.com/it) exist. The obvious thing to do would be to have 
links on each page, linking to the same page in each other available language. 
For example on the page www.domain.com/en/somepage you might have:

<ul class="language-menu">
<li><a href="/en/somepage">English</a></li>
<li><a href="/de/somepage">German</a></li>
<li><a href="/it/somepage">Italian</a></li>
</ul>

These links would be generated by the usual CakePHP array method.


Another option would be to create a sitemap, and on the sitemap, have links to 
each language's homepage, then make sure your sitemap is linked from your 
site's footer, or at least inform Google of your sitemap so it can crawl it.



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to