Template:GlobalText

From NovaRoma
(Difference between revisions)
Jump to: navigation, search
(Function to provide language contect sensitive text in templates)
 
m (cut out extra white space)
Line 1: Line 1:
 
<includeonly>{{#switch: {{NAMESPACE}}  
 
<includeonly>{{#switch: {{NAMESPACE}}  
| LA = {{#if: {{{LA|}}} | {{{LA}}} | {{{EN|}}} }}  
+
| LA = {{#if: {{{LA|}}} | {{{LA}}}| {{{EN|}}}}}  
| FR = {{#if: {{{FR|}}} | {{{FR}}} | {{{EN|}}} }}  
+
| FR = {{#if: {{{FR|}}} | {{{FR}}}| {{{EN|}}}}}  
| DE = {{#if: {{{DE|}}} | {{{DE}}} | {{{EN|}}} }}  
+
| DE = {{#if: {{{DE|}}} | {{{DE}}}| {{{EN|}}}}}  
| IT = {{#if: {{{IT|}}} | {{{IT}}} | {{{EN|}}} }}  
+
| IT = {{#if: {{{IT|}}} | {{{IT}}}| {{{EN|}}}}}  
| ES = {{#if: {{{ES|}}} | {{{ES}}} | {{{EN|}}} }}  
+
| ES = {{#if: {{{ES|}}} | {{{ES}}}| {{{EN|}}}}}  
| PT = {{#if: {{{PT|}}} | {{{PT}}} | {{{EN|}}} }}  
+
| PT = {{#if: {{{PT|}}} | {{{PT}}}| {{{EN|}}}}}  
| HU = {{#if: {{{HU|}}} | {{{HU}}} | {{{EN|}}} }}  
+
| HU = {{#if: {{{HU|}}} | {{{HU}}}| {{{EN|}}}}}  
 
| {{{EN|}}} }}</includeonly> <noinclude>[[Category:Templates]]
 
| {{{EN|}}} }}</includeonly> <noinclude>[[Category:Templates]]
 
==Purpose==
 
==Purpose==

Revision as of 03:41, 1 February 2008

Purpose

This function will provide language-context sensitive text. In the LA, FR, DE, IT, ES, PT, HU namespaces, text will appear in the namespace language, if provided. In all other namespaces, and in the case that no translation is provided, the English text will appear..

Scope

This template will generally be used to globalize other templates. There is no point to using it in articles directly.

Usage

{{GlobalText|EN = English text|LA = Latin text|FR = French text|DE = German text|IT = Italian text|ES = Spanish text|PT = Portuguese text|HU = Hungarian text}}

All values are optional, except that the English text is used as a default, so should always be provided. If no texts are provided, nothing will be returned.

Personal tools