Get user's preferred languages with JavaScript