Fixed setLocale bug in i18n