Refactor the i18n module