Commit 0551c214 authored by paalj's avatar paalj

HFP-2392 Load English translation as fallback

parent 3148eb5b
......@@ -435,6 +435,12 @@ class H5peditor {
if (empty($library['semantics'])) {
$translation = $this->getLibraryLanguage($library['machineName'], $library['majorVersion'], $library['minorVersion'], $languageCode);
// If translation was not found, and this is not the English one, try to load
// the English translation
if ($translation === NULL && $languageCode !== 'en') {
$translation = $this->getLibraryLanguage($library['machineName'], $library['majorVersion'], $library['minorVersion'], 'en');
}
if ($translation !== NULL) {
$translations[$library['machineName']] = json_decode($translation);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment