The 'fallbackSequence' is exactly generated for this purpose. It is equal to the value of 'fallback' after splitting, trimming and ensuring 'en' is present. See LocalisationCache::recache(). Also simplify returning of the first array index by returning it directly instead of modifying the array first. Due to an inconsistency between how LocalisationCache and Language classes treat the fallback sequence differently, we have to manually fallback to 'en' in case of unknown language codes. This is because otherwise Language::factory() will throw an exception causing tests to fail. We should investigate whether this is desirable or not, but keeping existing behaviour for now and documenting it. Change-Id: I9c1d51b59aabebf5a31f38205304bb8cc22dcd8c |
||
|---|---|---|
| .. | ||
| classes | ||
| data | ||
| i18n | ||
| messages | ||
| utils | ||
| .htaccess | ||
| ConverterRule.php | ||
| FakeConverter.php | ||
| Language.php | ||
| LanguageConverter.php | ||
| Names.php | ||