Contributions API

Calling all Drupal developers!

Help us get this on the first page of Digg. DIGG NOW!

Modules in 6

i18nmenu_get_router

Definition

i18nmenu_get_router($path)
contributions/i18n/i18nmenu/i18nmenu.module, line 157

Description

Get the menu router for this router path

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

Code

<?php
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];
}
?>