InterfaceTranslationRecorder.php in Localization client 8
File
l10n_client_ui/src/InterfaceTranslationRecorder.php
View source
<?php
namespace Drupal\l10n_client_ui;
use Drupal\Core\StringTranslation\Translator\TranslatorInterface;
class InterfaceTranslationRecorder implements TranslatorInterface {
protected $strings = array();
public function getStringTranslation($langcode, $string, $context) {
if ($langcode != 'en' || locale_is_translatable('en')) {
$this->strings[$langcode][$context][$string] = TRUE;
}
return FALSE;
}
public function reset() {
$this->strings = array();
}
public function getRecordedData() {
return $this->strings;
}
}