You are here

function values_translate in Values 7

Return a translated value if capable and a translation exists.

1 call to values_translate()
values_load_options in ./values.module
Load a value set's values formatted as an options array

File

./values.module, line 920
API for managing reusable value sets.

Code

function values_translate($set, $key, $string, $options = array()) {
  global $language;
  $options += array(
    'langcode' => $language->language,
  );
  return function_exists('i18n_string') ? i18n_string('values:' . $set . ':' . $key . ':value', $string, $options) : $string;
}