This should probably be something more like:

```js
var locale = req.acceptsLanguage(req.app.get('locales'));
```

Where `req.app.get('locales')` is an array of locales that this app supports.