add more checking in i18n gettext
initialize locales object