User:Władysław Komorek/LangSwitch/doc

Usage
Text in English language. Unless default is used, this text will also be used if the languages provided do not include the language set in the user's preferences. If you do not want to show any text when the user's language is English, then use "en=~". LangSwitch templates without an en option will be added to Category:LangSwitch template without English version.
 * en:
 * Status: required

Translated text in language xx (The parameter name xx can be any supported language code, and you can specify as many such parameters as needed for each translated language). Use "~" if you do not want any message (or default) in some specific language.
 * xx:
 * Status: optional

Default text in case one of the 'xx' languages is not the language of user’s preferences. By default, the English version will be shown, if provided.
 * default:

(English version)
 * Status: optional

language code (only needs to be provided if the language displayed is to be fixed and independent of the user’s preferences). This option is usually only used for template debugging.
 * lang:

value of  (the preferred language of the visitor viewing the page).
 * def:
 * Status:=optional

"nocat=1" will overwrite the default behavior of adding Category:LangSwitch template without English version to pages with no "en" and "default" options
 * nocat:
 * Status:=optional

Examples
Here are a few examples showing template behavior for three languages: English, Polish and Corsu, which defaults to Polish if Corsu text is not available:

The default option is intended for providing more language independent option. For example: 

will provide link to wikipedia articles in case one of the languages provided matches user's language but will link to Commons gallery page (Warsaw) if any other language is used.