I have coded a new localizated function to replace drupal_is_front_page():

<?php

/**
* Check if the current localizated page is the front page.
* @return
* TRUE if the current page is the front page; FALSE if otherwise. 
*/
function localizer_is_front_page() {
  // Test frontpage_redirect option
  if (variable_get('localizer_frontpage_redirect', TRUE)) {
    $locale = localizer_get_uilocale();
    // Get site_frontpage localizated
    $front = localizernode_get_localizedpath(variable_get('site_frontpage', 'node'), $locale);
    return (localizer_get_destination($locale) == $front);
  }
  else {
    return drupal_is_front_page();
  }
}

?>

It could be useful, by example, in block visibility tests:

<?php

  return (module_exists('localizer') ? localizer_is_front_page() : drupal_is_front_page());

?>

Comments

Roberto Gerola’s picture

Status: Needs review » Reviewed & tested by the community

Added to dev branch.
Many thanks.