Add auto-detection capabilities to the Lang class

This adds :
- a list of supported languages, trying to be backward-compatible with the existing configuration variable.
- a way to get the currently selected language & supported language list from the API.
- the capability to auto-detect the language based on the client's settings (whitelisted through the supported list).

Signed-off-by: Etienne Samson <samson.etienne@gmail.com>