Fixed i18n setting

Also set locale into cookies