Excuse-me if I'm wrong, or I'm in the wrong place.

I've installed a 4.7.4 drupal site with i18n.

Unfortunately, the $locale global variable was not being loaded correctly, even though the content was being translated.

After some headaches, I've found this function in common.inc:

function _drupal_bootstrap_full() {
  static $called;
  global $locale;

  ...

  // Initialize the localization system. Depends on i18n.module being loaded already.
  $locale = locale_initialize();
  // Let all modules take action before menu system handles the reqest
  module_invoke_all('init');
}

I've changed the order to

  // Let all modules take action before menu system handles the reqest
  module_invoke_all('init');
  // Initialize the localization system. Depends on i18n.module being loaded already.
  $locale = locale_initialize();

and it worked nicely.

In 4.7.3 the order was invoke modules, locale initialize. Why did it changed in 4.7.4?

Regards,

José San Martín

Comments

pwolanin’s picture

I'm thinkg this is related to an issue where modules during their hook_init were trying to set the locale and/or use t(), and this was causing serious performance issues since locale wasn't initialized properly.

see:
http://drupal.org/node/65801

where there also seem to be some patches for i18n to make it compatible with this change in core.

magico’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)