summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--i18n.module7
1 files changed, 5 insertions, 2 deletions
diff --git a/i18n.module b/i18n.module
index a1869b6..c647f87 100644
--- a/i18n.module
+++ b/i18n.module
@@ -309,13 +309,16 @@ function i18n_object_langcode($object, $default = FALSE, $field = 'language') {
/**
* Get translation information for objects
*/
-function i18n_object_info($type = NULL) {
+function i18n_object_info($type = NULL, $property = NULL) {
$info = &drupal_static(__FUNCTION__);
if (!$info) {
$info = module_invoke_all('i18n_object_info');
drupal_alter('i18n_object_info', $info);
}
- if ($type) {
+ if ($property) {
+ return isset($info[$type][$property]) ? $info[$type][$property] : NULL;
+ }
+ elseif ($type) {
return isset($info[$type]) ? $info[$type] : array();
}
else {