Bug 10515: (follow-up) fix use of GetBranchCategories
[koha.git] / C4 / Templates.pm
index 88b9b01..21604fc 100644 (file)
@@ -344,6 +344,10 @@ sub getlanguage {
         return $lang;
     }
 
+    # Pick the first selected syspref language
+    $lang = shift @languages;
+    return $lang if $lang;
+
     # Fall back to English if necessary
     return 'en';
 }