Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
msagi CreditAttribution: msagi commentedGeoIP 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 linegeoip_language_negotiation();
:Remember, this is just a patch :)
Comment #2
ramsegal CreditAttribution: ramsegal commentedHello there,
I am also facing the same problem.
The above patch doesn't work for me...
Anyone solved this issue?
Comment #3
soulston CreditAttribution: soulston commentedThis is working for me
Comment #4
bojanz CreditAttribution: bojanz at Centarro commented