Difference between revisions of "Template:PutLangURL"

From PC-BSD Wiki
Jump to: navigation, search
(Created page with "{{#if:{{getLang}}|{{getLang}}|{{{default|en}}}}}")
 
Line 1: Line 1:
{{#if:{{getLang}}|{{getLang}}|{{{default|en}}}}}
+
<includeonly>{{#if:{{getLang}}|{{getLang}}|{{{default|en}}}}}</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.

Revision as of 22:42, 5 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 but a different default can be defined as needed via {{putLangURL|default=de}} as an example.