public function readBatchWithFallback($language,
$fallback,
$type,
$key = 1,
$merge = true
) { $translationData =
$this->
readBatch($language,
$type,
$key,
$merge);
// Look for a fallback and correspondent translations
if (!
empty($fallback)) { $translationFallback =
$this->
readBatch($fallback,
$type,
$key,
$merge);
if (!
empty($translationFallback)) { // We need something like array_merge_recursive, but that also
// recursively merges elements with int keys.
foreach ($translationFallback as $translationKey =>
$data) { if (\
array_key_exists($translationKey,
$translationData)) { $translationData[$translationKey] +=
$data;
}