Hi,

I have a Drupal 7 multi-language(3) website. I have installed the Internationalization (7.x-1.0-beta2) module.

I have created for each language a page, and translate it to others two languages.

Now here is what I what to do: To set a kind of intelligent "front-page" to know what language is selected and set the front page(which I choose) in that language.

How can I do this? I know that in Internationalization module in not such kind of thing, am I right? If I set the front page to nothing I get this message: “No front page content has been created yet.” which is normal because Drupal is asking me for one front-page to be set, however I want to have for each language a front-page.

Comments

ekkosmos’s picture

May be there is a better way but finally here is how I did.

I have added in template.php the following code:

/**
 * Implements hook_preprocess_page().
 */
function MODULE_preprocess_page(&$vars) {
    if ($vars['is_front']) {
        $langcode = $GLOBALS['language']->language;

        if ($langcode == "en") {
            drupal_goto('home');
        } elseif ($langcode == "fr") {
            drupal_goto('accueil');
        }
    }
}