You are here

function entity_i18n_string in Entity API 7

Helper for using i18n_string().

Parameters

$name: Textgroup and context glued with ':'.

$default: String in default language. Default language may or may not be English.

$langcode: (optional) The code of a certain language to translate the string into. Defaults to the i18n_string() default, i.e. the current language.

See also

i18n_string()

2 calls to entity_i18n_string()
Entity::getTranslation in includes/entity.inc
Gets the raw, translated value of a property or field.
EntityAPIi18nItegrationTestCase::testDefaultController in ./entity.test
Tests the provided default controller.

File

./entity.module, line 1340

Code

function entity_i18n_string($name, $default, $langcode = NULL) {
  return function_exists('i18n_string') ? i18n_string($name, $default, array(
    'langcode' => $langcode,
  )) : $default;
}