Language selector - nschonni/wet-boew GitHub Wiki
This component provides ASP, Javascript, Perl, and PHP approaches for automatically linking to different language versions of the current page.
Project lead: Jeff Gordon (@jeffdavidgordon)
- Simplifies Web page maintenance by eliminating the need to hard code language links
- Conforms to WCAG 2.0 AA
- Linking to different language versions of the current page
- Modify the language link so it targets the server-side script. The language selector scripts rely on the HTTP_REFERER value but you can append the current URL to the query string when calling the script to improve accuracy:
http://www.gc.ca/cgi-bin/lang?http://www.gc.ca/index-eng.htm
- To enable secondary jQuery support, add class="wet-boew-langselect" to the language link.
<li id="gcwu-gcnb-lang"><a class="wet-boew-langselect" href="langselect/lang.php" lang="fr">Français</a></li>
- Some browsers can be configured to block the HTTP_REFERER value