I had set up a multilanguage website with language detection by URL prefix with GeoIP fallback.
After adding i18n variables in the settings.php file, they didn't work as expected. I set my site's footer and title as multilanguage variables, and they appeared in the i18n_variable table in the database, but nothing actually happened.
After disabling GeoIP, these variables worked normally.

Comments

msagi’s picture

GeoIP language negotiation is called _AFTER_ i18n variables initialization. The value $language->language has not set up correctly at this moment and this causes i18n variables malfunctioning.

To patch it working again search for the function geoip_language_init() in geoip_language.module . Since you should reinitialize i18n variables after GeoIP language negotiation, insert the following code after line geoip_language_negotiation();:

//patch: reinitialize i18n variables after GeoIP language negotiation
global $language;
i18n_variable_init($language->language);

Remember, this is just a patch :)

ramsegal’s picture

Hello there,

I am also facing the same problem.

The above patch doesn't work for me...

Anyone solved this issue?

soulston’s picture

This is working for me

bojanz’s picture

Issue summary: View changes
Status: Active » Closed (outdated)