Middleware for connect to handle i18n