Creating a menu to switch languages on site
Posted
by
user342391
on Stack Overflow
See other posts from Stack Overflow
or by user342391
Published on 2011-02-04T15:17:21Z
Indexed on
2011/02/04
15:25 UTC
Read the original article
Hit count: 214
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.
© Stack Overflow or respective owner