Template:LangPrefix/doc: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Gwyneth Llewelyn (talk | contribs)
Shamelessly copied from wiki.openstreetmap.org
 
Gwyneth Llewelyn (talk | contribs)
{{LLS}} because {{LL}} means Linden Lab here...
 
Line 47: Line 47:
* {{T|Langcode}}
* {{T|Langcode}}
* {{T|LangSwitch}}, returning one of several translations available for a specific language (or its associated fallback language).
* {{T|LangSwitch}}, returning one of several translations available for a specific language (or its associated fallback language).
* {{T|LL}}, {{T|LLC}}, {{T|LLT}}  
* {{T|LLS}}, {{T|LLC}}, {{T|LLT}}  
* {{T|DescriptionStatus}}
* {{T|DescriptionStatus}}



Latest revision as of 01:32, 14 September 2022

This template provides the language prefix for wiki page name from a language code.

Usage

  • {{LangPrefix}} returns the language prefix (with :) from the language code infered from the current page (using {{Langcode}}).
  • {{LangPrefix|language-code}} returns the language prefix (with :) from the language code.
  • {{LangPrefix|language-code|fallback= yes }} returns the language prefix for the fallback language of the specified language.

Examples

Wikitext Produces
"{{LangPrefix}}" ""
"{{LangPrefix|}}" ""
"{{LangPrefix|en}}" ""
"{{LangPrefix|ja}}" "JA:"
"{{LangPrefix|ain}}" "ain:"
"{{LangPrefix|ain|fallback= yes }}" "JA:"
"{{LangPrefix|de-ch}}" "de-ch:"
"{{LangPrefix|de-ch|fallback= yes }}" "DE:"
"{{LangPrefix|br}}" "br:"
"{{LangPrefix|br|fallback= yes }}" "FR:"

See also