Defines the locale translation string object.
This class represents a translation of a source string to a given language, thus it must have at least a 'language' which is the language code and a 'translation' property which is the translated text of the source string in the specified language.
Hierarchy
- class \Drupal\locale\StringBase implements StringInterface
- class \Drupal\locale\TranslationString
File
- core/modules/locale/src/TranslationString.php, line 13
Namespace
Drupal\locale
Members
Name | Modifiers | Type | Description |
---|---|---|---|
StringBase::$context | public | property | The string context. |
StringBase::$lid | public | property | The string identifier. |
StringBase::$locations | public | property | The string locations indexed by type. |
StringBase::$source | public | property | The source string. |
StringBase::$storage | protected | property | The locale storage this string comes from or is to be saved to. |
StringBase::$version | public | property | The string version. |
StringBase::addLocation | public | function | Adds a location for this string. Overrides StringInterface::addLocation |
StringBase::getId | public | function | Gets the string unique identifier. Overrides StringInterface::getId |
StringBase::getLocations | public | function | Gets location information for this string. Overrides StringInterface::getLocations |
StringBase::getPlurals | public | function | Splits string to work with plural values. Overrides StringInterface::getPlurals |
StringBase::getStorage | public | function | Gets the string storage. Overrides StringInterface::getStorage |
StringBase::getValues | public | function | Gets field values that are set for given field names. Overrides StringInterface::getValues |
StringBase::getVersion | public | function | Gets the string version. Overrides StringInterface::getVersion |
StringBase::hasLocation | public | function | Checks whether the string has a given location. Overrides StringInterface::hasLocation |
StringBase::setId | public | function | Sets the string unique identifier. Overrides StringInterface::setId |
StringBase::setPlurals | public | function | Sets this string using array of plural values. Overrides StringInterface::setPlurals |
StringBase::setStorage | public | function | Sets the string storage. Overrides StringInterface::setStorage |
StringBase::setValues | public | function | Sets an array of values as object properties. Overrides StringInterface::setValues |
StringBase::setVersion | public | function | Sets the string version. Overrides StringInterface::setVersion |
TranslationString::$customized | public | property | Integer indicating whether this string is customized. |
TranslationString::$isNew | protected | property | Boolean indicating whether the string object is new. |
TranslationString::$language | public | property | The language code. |
TranslationString::$translation | public | property | The string translation. |
TranslationString::delete | public | function | Deletes string object from storage. Overrides StringBase::delete |
TranslationString::getString | public | function | Gets plain string contained in this object. Overrides StringInterface::getString |
TranslationString::isNew | public | function | Checks whether the object is not saved to storage yet. Overrides StringInterface::isNew |
TranslationString::isSource | public | function | Checks whether the object is a source string. Overrides StringInterface::isSource |
TranslationString::isTranslation | public | function | Checks whether the object is a translation string. Overrides StringInterface::isTranslation |
TranslationString::save | public | function | Saves string object to storage. Overrides StringBase::save |
TranslationString::setCustomized | public | function | Sets the string as customized / not customized. |
TranslationString::setString | public | function | Sets the string contained in this object. Overrides StringInterface::setString |
TranslationString::__construct | public | function | Constructs a new locale string object. Overrides StringBase::__construct |
Please login to continue.