set `i18n.enforce_available_locales` before `i18n.default_locale`.

Related to #13159 

There is order dependence between `enforce_available_locales` and `default_locale`. `enforce_available_locales` must be set beforehand to make sure it's up to date when the `default_locale` is set.