Selecting Language with Flag Icons
By Paul
4/5 based on 2 votes. The median rating is 3.
By Paul
Suppose you have multiple languages and want to let people choose them by clicking flags, instead of with the selector.
Place this HTML in your template (presumably the wrapper) where you want it, perhaps in the spot currently occupied by the language selector:
Change yourlanguagename to the name of the language and flagimageforthislanguage to the image url for each one, and copy as many times as needed for the number of languages you have.
Place this HTML in your template (presumably the wrapper) where you want it, perhaps in the spot currently occupied by the language selector:
<a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=yourlanguagename"><img src="flagimageforthislanguage" alt="this language" /></a>
<a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=yourlanguagename"><img src="flagimageforthislanguage" alt="this language" /></a>
<a href="index.php?action=setlanguage&returnto={CURRENTURLENCODED}&languagegroup=yourlanguagename"><img src="flagimageforthislanguage" alt="this language" /></a>
Change yourlanguagename to the name of the language and flagimageforthislanguage to the image url for each one, and copy as many times as needed for the number of languages you have.
Rating:
4/5 based on 2 votes. The median rating is 3.
Submitted: 04/01/09 (Edited 07/28/09)
Description: Language switching with flag images to represent languages.
Views:
157 views. Averaging 0 views per day.
In the most recent 30 day period, there've been 0 views.

Print
E-Mail