Creating a menu to switch languages on site
- by user342391
I have a dropdown menu on my site that I want to use to switch between the different languages:
<select onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value" name="userLanguage" id="userLanguage">
<option value="http://demo.com/?lang=en">
English (International)</option>
<option value="http://demo.com/?lang=es">
Español (European)</option>
</select>
How can I get the above menu to display which language is currently showing. Is there someway of showing an active state. Site is using php.
Thanks in advance.