Switch by Host name...does it work by directory name

Mojah - January 26, 2007 - 21:17
Project:Localizer
Version:5.x-1.x-dev
Component:User interface
Category:support request
Priority:minor
Assigned:Unassigned
Status:closed
Description

I would like to setup a site using the following way
domain.com = english
domain.com/es = spanish
domain.com/de = german

This setup will allow me to use views correctly and setup home pages for each language and be great for search engines etc.

I am testing on test.domain.com. I have localizer latest from cvs and have switch by host name option selected. I created pages in th 3 languages. When I click on any of the block switch links to german or spanish, I get a page not found error. This must have something to do with the way I have it configured, but I cannot figure it out.

Thank you.

#1

Roberto Gerola - January 27, 2007 - 07:57

The locale must be part of the nodes alias.
You have to specify explicitly the alias for each node.

domain.com/en/mycontent
domain.com/es/mycontent
domain.com/de/mycontent

But you could also a different approach, using the switch by node's locale
and create the aliases in this manner :

domain.com/contact (English)
domain.com/contacto (Spanish)
domain.com/kontakt (German)

#2

Roberto Gerola - January 27, 2007 - 14:45

My default language is English.
I've created a page with an alias : en/home and assigned it under settings.
Created the Italian translation : it/home
Activated the front page redirection.

#3

Mojah - January 29, 2007 - 02:29

How to work around this...

I've set the switch by host name as you suggested and created nodes with specific path aliases.
like this...
switch by hostname option selected
english is left blank
spanish = es/home
german = de/home

When I am on the home page and click the language switcher I notice the link has a /node at the end of it, resulting in a page not found error
eg. test.domain.net/de/home/node (this is the link in the language switcher block)
eg2. test.domain.net/es/home/node

When I go directly to the nodes using the path alias I created, the language switcher block has de/de/home and es/es/home

Maybe using the switch by hostname should only be used by simple static sites and not by multi-user sites where users are submitting multi-lingual content?

I am developing a spiritual community site where translators from around the world volunteer to translate work from English into Spanish, German, Italian, Dutch, Polish, Romanian, Greek and Turkish with potential for many more volunteers in many different languages. I don't want the translators to think about path aliases and configuration matters, just to login and translate nodes whenever they can. I would like each language to have its own home page where the basic static site info and menus are displayed and then a listing of the dynamic content that is added everyday.

New english content is added once a day (which is the spiritual message - http://heavenletters.org ) and volunteer translators translate the messages when they can. Some (italian and spanish) as often as the new english messages are posted. At present everything is laboriously done manually.

For, the spiritual messages I am going to use cck to create a content type for them. The messages will be tagged to associate with different themes like love, relationship, overcoming grief, gratitude etc. Translators should essentially be able to login and click to translate...pretty much like what is available right now, with the translations tab.

I will look more into this and see if I can be of any help.

Thank you!

#4

Roberto Gerola - January 29, 2007 - 14:20

Ok, the problem could be the english page blank.
So Drupal shows you the default page : /node.

Assign an alias to the English version :
home or en/home, as you prefer, than under general settings
say to Drupal that home or en/home is your front page.

Let me know.

P.S. : Upgrade to version 1.7 please, so I can provide a better support.

#5

Roberto Gerola - May 28, 2007 - 08:40
Status:active» closed

#6

durum - October 28, 2008 - 14:54

I get the same error in D6.6: While the page links are like /en/home or /de/home it is ok, but the URL of the logo stays as /de and when you click the Logo to get to home page of the translated language (like de/home) I get the 404. Any idea?

 
 

Drupal is a registered trademark of Dries Buytaert.