Detect user language

I've tried the language selector plugin to autodetect user language. It works on localhost but not online. Does anyone know what could be wrong. The two elgg setups are identical - 1.7.3.