You are here

function i18n_string_translate_access in Internationalization 7

Check user access to translate a specific string.

If the string has a format the user is not allowed to edit, it will return FALSE

Parameters

$string_format;: String object or $format_id

File

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

Code

function i18n_string_translate_access($string_format, $account = NULL) {
  $format_id = is_object($string_format) ? i18n_object_field($string_format, 'format') : $string_format;
  return user_access('translate interface', $account) && (empty($format_id) || i18n_string_allowed_format($format_id) && ($format = filter_format_load($format_id)) && filter_access($format, $account));
}