You are here

function i18n_string_object_info in Internationalization 7

Get information about object string translation

2 calls to i18n_string_object_info()
i18n_string_i18n_string_objects in i18n_string/i18n_string.i18n.inc
Implements hook_i18n_string_objects().
i18n_string_module_string_list in i18n_string/i18n_string.admin.inc
Get all strings from a module.

File

i18n_string/i18n_string.module, line 840
Internationalization (i18n) package - translatable strings.

Code

function i18n_string_object_info($type = NULL, $property = NULL) {
  if ($type) {
    if ($info = i18n_object_info($type, 'string translation')) {
      if ($property) {
        return isset($info[$property]) ? $info[$property] : NULL;
      }
      else {
        return $info;
      }
    }
  }
  else {
    $list = array();
    foreach (i18n_object_info() as $type => $info) {
      if (!empty($info['string translation'])) {
        $list[$type] = $info;
      }
    }
    return $list;
  }
}