You are here: Foswiki>System Web>Category>UserDocumentationCategory>TimeSpecifications>LanguageSelector (2024-12-23, UnknownUser)Edit Attach
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 not enabled
Usage:
%INCLUDE{"%SYSTEMWEB%.LanguageSelector"}%
Result:
%STARTSECTION{"selector"}%<form 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="this.form.submit()"> <option value='default'>%MAKETEXT{"Default"}%</option> %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"}%
Edit | Attach | Print version | History: r1 | Backlinks | View wiki text | Edit wiki text | More topic actions
Topic revision: r1 - 2024-12-23, UnknownUser
Copyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback