You are here

function i18nmenu_get_router in Internationalization 6

Get the menu router for this router path.

We need the untranslated title to compare, and this will be fast. There's no api function to do this?

1 call to i18nmenu_get_router()
i18nmenu_localize_tree in i18nmenu/i18nmenu.module
Localize menu tree.

File

i18nmenu/i18nmenu.module, line 244
Internationalization (i18n) submodule: Menu translation.

Code

function i18nmenu_get_router($path) {
  static $cache = array();
  if (!array_key_exists($path, $cache)) {
    $cache[$path] = db_fetch_array(db_query("SELECT title FROM {menu_router} WHERE path = '%s'", $path));
  }
  return $cache[$path];
}