---+!! Language selection dropdown *To be included where a language selection is needed, for instance in the top bar or left bar.* Note: this dropdown is only shown if localization is enabled.%BR% Test: %IF{"context i18n_enabled" then='<span style="color:green; font-weight:bold;">localization is enabled</span>' else='<span style="color:red; font-weight:bold;">localization is not enabled</span>'}% %BR% Usage: <verbatim> %INCLUDE{%SYSTEMWEB%.LanguageSelector}% </verbatim> Result: %STARTINCLUDE%%IF{"context i18n_enabled" then='<form name="changeLanguage" action="%SCRIPTURLPATH{"oops"}%/%BASEWEB%/%BASETOPIC%" method="get"><select name="language" class="twikiSelect" onchange="document.changeLanguage.submit()">%LANGUAGES{format="<option $marker value=\"$langtag\">$langname</option>" selection="%LANGUAGE%" separator=" "}%</select><input type="hidden" name="template" value="oopslanguagechanged" /><noscript><input class="twikiButton" type="submit" value="%MAKETEXT{"Change language"}%" /></noscript></form>'}%%STOPINCLUDE%
This topic: TWiki
>
LanguageSelector
Topic revision: r3 - 2005-10-14 - TWikiContributor
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.LanguageSelector
.