Added middleware to retrieve i18n locale