When sometimes you think you know it all of it, there is always something new to be learn.
After building a multilingual corporate site, where the client insisted on a static introduction page to be their front page, doing it is actually quite simple and strait forward (basic Drupal administration - Admin/settings/site-information >> Default front page set it to the desired node/nid of you're node).
Problems started when the client translated this page into different languages and using the internationalization module. Everything worked fine as expected, until problems occur with the site home page when you try to switch to a different language, strangely everything was translated: interface, menu's, views but the not the content, it didn't want to change being stuck in the source language.
Frustrating, something is not right here! Felt like the front page was hard coded and this was what actually was happening. Never the less I pre checked all the modules, did I forgot to enable anything? This never happened before to me, but actually what is different this time?
I came across http://drupal.org/node/313272 about multi lingual variables($conf['i18n_variables'] ) this is just what I need! Store the front page as a variable so can be called up in different languages.

I still needed to add the “site_frontpage” to the $conf['i18n_variables'] array this enabled me to have the front page field in site-information as a multilingual variable, off course I had to change these value for all the languages but it worked out fine. It also enabled me to set other fields to, like the site name, site slogan mission and footer. This is what I needed to add to my settings.php:
/** * Multilingual settings * * This is a collection of variables that can be set up for each language when i18n is enabled. * These are the basic ones for Drupal core, but you can add your own here. */ $conf['i18n_variables'] = array( // Site name, slogan, mission, etc.. 'site_name', 'site_slogan', 'site_mission', 'site_footer',
'site_frontpage', 'anonymous', // Different front page for each language 'site_frontpage', // Primary and secondary links 'menu_primary_links_source', 'menu_secondary_links_source', // Contact form information 'contact_form_information', // For theme variables, read more below 'theme_settings', 'theme_garland_settings',
);
Jorge




Comments
Post new comment