class InterfaceTranslationRecorder in Localization client 8
String translation listener to collect data.
Hierarchy
- class \Drupal\l10n_client_ui\InterfaceTranslationRecorder implements TranslatorInterface
Expanded class hierarchy of InterfaceTranslationRecorder
1 string reference to 'InterfaceTranslationRecorder'
- l10n_client_ui.services.yml in l10n_client_ui/
l10n_client_ui.services.yml - l10n_client_ui/l10n_client_ui.services.yml
1 service uses InterfaceTranslationRecorder
File
- l10n_client_ui/
src/ InterfaceTranslationRecorder.php, line 10
Namespace
Drupal\l10n_client_uiView source
class InterfaceTranslationRecorder implements TranslatorInterface {
/**
* String that were attempted to be looked up in this request.
*
* @var array
*/
protected $strings = array();
/**
* @inheritdoc
*/
public function getStringTranslation($langcode, $string, $context) {
if ($langcode != 'en' || locale_is_translatable('en')) {
$this->strings[$langcode][$context][$string] = TRUE;
}
return FALSE;
}
/**
* @inheritdoc
*/
public function reset() {
$this->strings = array();
}
/**
* @inheritdoc
*
* @return array
* Array of strings keyed by language code and context.
*/
public function getRecordedData() {
return $this->strings;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
InterfaceTranslationRecorder:: |
protected | property | String that were attempted to be looked up in this request. | |
InterfaceTranslationRecorder:: |
public | function | @inheritdoc | |
InterfaceTranslationRecorder:: |
public | function |
@inheritdoc Overrides TranslatorInterface:: |
|
InterfaceTranslationRecorder:: |
public | function |
@inheritdoc Overrides TranslatorInterface:: |