| META TOPICPARENT |
name="TimeSpecifications" |
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.
Test: localization is enabled
Usage:
%INCLUDE{"%SYSTEMWEB%.LanguageSelector"}%
Result:
<-- Error: no such plugin chili
%STARTSECTION{"selector"}%<form name="changeLanguage"\
action="%SCRIPTURLPATH{"oops"}%/%BASEWEB%/%BASETOPIC%" method="get">
<input type="hidden" name="redirectto" value="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?%QUERYPARAMS{encoding="url" separator=";"}%" />
<select name="language" class="foswikiSelect"\
onchange="document.changeLanguage.submit()">
%LANGUAGES{
format="<option $marker value=\"$langtag\">$langname</option>"
selection="%LANGUAGE%"
separator=" "
marker="selected=\"selected\""
}%</select>
<input type="hidden" name="template" value="oopslanguagechanged" />
<noscript>
<input class="foswikiButton" type="submit"\
value="%MAKETEXT{"Change language"}%" />
</noscript>
</form>%ENDSECTION{"selector"}%
--> |