It sets best suited locale variable for given user:
- Check for presence and value of request._LOCALE_ value
- Then tries the address url, if the first part has locale indicator.
- It checks cookies, for value set here
- Tries to best match accepted language for browser user is visiting
- website with
- Defaults to localize.locales.default configuration setting value
Parameters: request (pyramid.request.Request) – a request object Returns: locale name Return type: str