moved translation logic to i18n lib