$message=t('Content translation has been enabled. To use content translation, <a href="!language_url">enable at least two languages</a> and <a href="!settings_url">enable translation</a> for <em>content types</em>, <em>taxonomy vocabularies</em>, <em>accounts</em>, or any other element you wish to translate.',$t_args);
// Translation works when at least two languages are enabled.
$message=t('<a href="!settings_url">Enable translation</a> for <em>content types</em>, <em>taxonomy vocabularies</em>, <em>accounts</em>, or any other element you wish to translate.',$t_args);
drupal_set_message(t('The entities of type %entity_type do not define a valid base path: it will not be possible to translate them.',array('%entity_type'=>$info['label'])),'warning');
// If the base path is not defined we cannot provide the translation UI
// for this entity type. In some cases the actual base path might not have
// a menu loader associated, hence we need to check also for the plain "%"
watchdog('entity translation','The entities of type @entity_type do not define a valid base path: it will not be possible to translate them.',$t_args,WATCHDOG_WARNING);
}
else{
$entity_position=count(explode('/',$path))-1;
...
...
@@ -225,6 +235,19 @@ function translation_entity_menu_alter(array &$items) {
}
}
/**
* Strips out menu loaders from the given path.
*
* @param string $path
* The path to process.
*
* @return
* The given path where all the menu loaders are replaced with "%".