Refactor and update the Locale component to I18n with improved locale support