Browse Source

Make locales uniform

If the user enters ´fi-fi´ or ´FI-FI´ you get ´fi-FI´ (or ´fi-fi´ if ´forceAllLowercase´).
inoas 8 years ago
parent
commit
2a1e53a734
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Utility/Language.php

+ 3 - 0
src/Utility/Language.php

@@ -43,6 +43,9 @@ class Language {
 					$language = strtolower($language);
 				} else {
 					$language = substr_replace($language, strtolower(substr($language, 0, 2)), 0, 2);
+					if (strlen($language) === 5) {
+						$language = substr_replace($language, strtoupper(substr($language, 3, 2)), 3, 2);
+					}
 				}
 
 				if ($keepDuplicates) {