Sorry for the inconvenience.  Chance of typos in templates, the navigation header should be functional for most versions of the handbook.
Potential remains for unforeseen breakage primarily in the handbook portion of the wiki.
Notice will be up until above verified and no other troubles found from recent modifications.

Difference between revisions of "Template:PutLangURL"

From PC-BSD Wiki
Jump to: navigation, search
(hope this works..)
Line 1: Line 1:
<includeonly>{{testLang}}</includeonly><noinclude>
+
<includeonly>{{#switch: {{getLang}}  <!-- The idea is to have a list of supported languages for a URL -->
 +
| {{{1}}}      = {{getLang}}
 +
| {{{2}}}      = {{getLang}}
 +
| {{{3}}}      = {{getLang}}
 +
| {{{4}}}      = {{getLang}}
 +
| {{{5}}}      = {{getLang}}
 +
| {{{6}}}      = {{getLang}}
 +
| {{{7}}}      = {{getLang}}
 +
| {{{8}}}      = {{getLang}}
 +
| {{{9}}}      = {{getLang}}
 +
| {{{10}}}      = {{getLang}}
 +
| {{{11}}}      = {{getLang}}
 +
| {{{12}}}      = {{getLang}}
 +
| {{{13}}}      = {{getLang}}
 +
| {{{14}}}      = {{getLang}}
 +
| {{{15}}}      = {{getLang}}
 +
| en            <!-- default -->
 +
}}</includeonly><noinclude>
 
This template allows for external URLs which may have a localized URL to automatically localize by swapping this template for the portion that has the iso language designation, such as with '''{{http}}www.freebsd.org/doc/'''''<nowiki>{{putLangURL}}</nowiki>'''''/books/developers-handbook/''' for {{http}}www.freebsd.org/doc/'''en'''/books/developers-handbook/. The normal result will be "en" because generally English URLs tend to be used as standard here. <!-- but a different default can be defined as needed via <nowiki>{{putLangURL|default=de}}</nowiki> as an example.
 
This template allows for external URLs which may have a localized URL to automatically localize by swapping this template for the portion that has the iso language designation, such as with '''{{http}}www.freebsd.org/doc/'''''<nowiki>{{putLangURL}}</nowiki>'''''/books/developers-handbook/''' for {{http}}www.freebsd.org/doc/'''en'''/books/developers-handbook/. The normal result will be "en" because generally English URLs tend to be used as standard here. <!-- but a different default can be defined as needed via <nowiki>{{putLangURL|default=de}}</nowiki> as an example.
 
{{#if:{{getLang}}|{{getLang}}|{{{default|en}}}}} -->
 
{{#if:{{getLang}}|{{getLang}}|{{{default|en}}}}} -->

Revision as of 00:08, 6 September 2013

This template allows for external URLs which may have a localized URL to automatically localize by swapping this template for the portion that has the iso language designation, such as with http://www.freebsd.org/doc/{{putLangURL}}/books/developers-handbook/ for http://www.freebsd.org/doc/en/books/developers-handbook/. The normal result will be "en" because generally English URLs tend to be used as standard here.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox