Refactor i18n support.