Code style changes (early returns instead of nested ifs).
Use one loop for L10n::getCurrentLocaleIndex() instead of three.