function _registration_translate in Entity Registration 7
Same name and namespace in other branches
- 8.2 registration.module \_registration_translate()
- 8 registration.module \_registration_translate()
- 7.2 registration.module \_registration_translate()
Translates a config string to the current language or to a given language.
Parameters
$name string: A key *without* a textgroup (this module's textgroup will be prefixed automatically).
$string string: A user-entered configuration string in the default language. The default language may or may not be English.
$langcode string: The language code. Defaults to NULL.
Return value
string The translated string, if i18n_string() is available. Otherwise, returns $string.
See also
https://drupal.org/node/1114010
1 call to _registration_translate()
- registration_field_formatter_view in includes/
registration.field.inc - Implements hook_field_formatter_view().
File
- ./
registration.module, line 2080
Code
function _registration_translate($name, $string, $langcode = NULL) {
return function_exists('i18n_string') ? i18n_string('registration:' . $name, $string, array(
'langcode' => $langcode,
)) : $string;
}