It seems that there's no localization for the selected home page. The way I would imagine it should work is that if I select a "Default home page" to a node and this node is translated, I'll get the translated node when viewing that language.

For example, when I go to example.com/es, I should get the Spanish version of whatever node I set as home page.

Does the i18n module do that? If it doesn't we'll be more than happy to lend a hand and add this feature.

CommentFileSizeAuthor
#2 i18n_setting.jpg76.84 KBicanlocalize

Comments

burgs’s picture

As far as i can tell this works. If i create a node that has url "/demo" and i set the homepage in Site Information to "demo" then if i go to example.com/es i get the spanish version of that node.
You may have to change settings on admin/settings/i18n to get it working how you'd like.

icanlocalize’s picture

StatusFileSize
new76.84 KB

Hi burgs,

Here is my example:
http://drupal-translation.com/

I've set the home page to http://drupal-translation.com/node/7. If I click on the Spanish link at the bottom, I get to http://drupal-translation.com/es/node/9, which is OK. However, if I click on the Spanish link in the menu, I get to http://drupal-translation.com/es, which serves the same English contents.

There's no page admin/settings/i18n. The multilingual system setup is in admin/settings/language/i18n and I don't see any setting which could change the node for the home page. Attached is a screen shot.

burgs’s picture

Try setting the home page to a url alias. Ie, give your page the path of "home" and then set the Site info homepage to "home" instead of setting it to node/7

I just tried it, and changing mine to node/xxx made it not automatically translate. So this should def work for you.

icanlocalize’s picture

Just did that. Called note/7 'home' and set the home page to 'home'. Now, http://drupal-translation.com/ gives me the home page and http://drupal-translation.com/es gives a 'Page not found' error.

Why not add this to i18n? Even if it can work with a workaround, it can still be added to the module, the way it should work.

brucepearson’s picture

You also need to set the url alias on the translated page to "home" to get this to work.

Now http://drupal-translation.com/ goes to the home page
and http://drupal-translation.com/es goes to the Spanish home page.

icanlocalize’s picture

Status: Active » Closed (fixed)

I believe it would be good if the home page would set without this patch, but the way brucepearson described works fine.

alexkb’s picture

Thanks brucepearson - that works great! :) Subscribing.

Marko B’s picture

i dont get this, how can u set url alias to more than one page to "home" you cannot, so how does this work?

ephy’s picture

1.You have to create your homepage on each language.
2. change the URL alias on each page, but put the same alias ( i.e.: home)
3. go to site information (admin/settings/site-information) and put the url alias you choose on "Default front page" (home)

Good luck!

ephy
forex online
freelancer software engineer

SeriousMatters’s picture

I CANNOT change url alias on a translation page to 'home'. Because 'home' is already taken by the English page, I cannot use 'home' again for a translation page. To those who suggested to use 'home' for both pages, can you describe how did you do that?

Here is the steps I made.
- I go to the English home page
- enter 'home' for url alias and click save
- Click 'Translation'
- Click edit a translation
- Enter 'home' for url alias and click save
- The url alias field of the translation page goes back to *blank*

SeriousMatters’s picture

Status: Closed (fixed) » Closed (won't fix)

I have some updates regarding the issue.

Under Administer => Site building => URL aliases, there are 2 records of "home | node/1 | English". I edited one of these aliases to " home | node/9 | Spanish ". www .mydomain .com now points to English homepage and www .domain .com/es points to the Spanish homepage as they should.

Then I make some changes to the Spanish home page (node/9) and click save. The aliases revert back to 2 records of " home | node/1 | English " again. And www .mydomain .com/es is 404

I repeat this experiment again, changing the 2 aliases to " home | node/1 | English " and " home | node/9 | Spanish ". This time I edit the English homepage (node/1) and click save. Now both aliases records are home | node/9 | Spanish " and www .mydomain .com is 404.

Whenever I save a node with an URL alias already used else where, the alias record is changed to match the other record. This is definitely a bug. Perhaps in the SQL.

ardnet’s picture

Hi all, try this...
1. Go to Administer -> Content Management -> Content Types
2. click Edit on what ever your Content Types is.
3. Under Workflow, Enable the Multilingual Support, then click Save.

4. Supposed you have 3 languages: EN, JP, KO. Create 3 contents (node) for your home page.
5. Don't forget to set the Language (there will be a dropdown to select the languages, coz you already set in no.3) for each of those 3 contents.
6. For all those 3 contents, set the URL path settings to the same path, in this case probably 'home' (this one work for me).

7. Then go to Site Configuration -> Site Information
8. Under Default front page, put in 'home'

Then try your home page in different languages :)
Cheers.

star-szr’s picture

Component: Code » Blocks

To add to the instructions in #12, make sure your pages are NOT linked via the Translate tab.

star-szr’s picture

Component: Blocks » Miscellaneous

Looks like we lost the 'Code' Component.

utneon’s picture

Status: Closed (won't fix) » Closed (fixed)

I guess you all are looking for this:

http://www.frenssen.be/content/setting-different-front-page-each-languag...

This will solve all your problems about multi language variables and multiple site information, enabling then multiple front pages even with different url path alias.

dxiri’s picture

Version: 6.x-1.0-beta6 » 7.x-1.8

THANK YOU! that link solved it, at first I didn't see the menu he was talking about, but that is because you need to enable the Variable Translations part of the i18n module. After that it just works no problem :D

I am using Drupal 7.19 just in case.