i18n: Make get_locale protected

The get_locale method is not testable with our set_lang() method in the
i18n test. However the i18n test itself remains correct since we only
fallback to the get_locale method when the environment variables are
unset.

This way we don't test the get_locale method explicitly while ensuring
the correctness of the i18n module.