public function countTranslations() { return $this->
dbExecute("SELECT t.language, COUNT(*) AS translated FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid GROUP BY t.language"
)->
fetchAllKeyed();
} /**
* {@inheritdoc}
*/
public function save($string) { if ($string->
isNew()) { $result =
$this->
dbStringInsert($string);
if ($string->
isSource() &&
$result) { // Only for source strings, we set the locale identifier.
$string->
setId($result);
} $string->
setStorage($this);
} else { $this->
dbStringUpdate($string);
} // Update locations if they come with the string.
$this->
updateLocation($string);