In includes/path.inc there is a variable_get('site_frontpage', 'node') in function drupal_init_path() { which returns the site_frontpage value in the variable table in stead of the the value saved by using language dependent variables.

In every other place variable_get returns the language dependent one, but not there. I suppose this is because i18n is not loaded yet or something. Needs more investigating.

CommentFileSizeAuthor
#2 i18n.patch1.61 KBjax

Comments

jax’s picture

If you put i18n_variable_init(); in the drupal_init_path() piece it works beautifully. Doing i18n_variable_init(); in hook_boot() doesn't work and hook_init() is too late. Any alternatives?

jax’s picture

Status: Active » Needs review
StatusFileSize
new1.61 KB

Here is a patch that enables the use of site_frontpage as language dependent variable. This means that you can go to ?q=nl and get the Dutch front page, ?q=fr and get the French one.

It removes a line from drupal core so this cannot be integrated in the module. I would appreciate other suggestions though.

fletchgqc’s picture

Status: Needs review » Closed (duplicate)

Marking this as a duplicate. Basically the same issue is being discussed here #249694: Multilingual front page and a "page not found" error for both D5 and D6 so it would be best to have all the discussion in one place. Please post your patch there.