J1.5

Difference between revisions of "Languages parameter type"

From Joomla! Documentation

m (Fixed category mess)
(This is a parameter, not a form field.)
Line 1: Line 1:
 
[[Image:Params.language.jpg|right]]
 
[[Image:Params.language.jpg|right]]
 +
 +
{{Ambox|type=notice|text=[[Parameter|Parameters]] have been superseded by [[Form field|form fields]] in Joomla! 1.6. You may want to use the corresponding [[Language form field type]].}}
 +
 
The '''languages''' parameter type provides a drop down list of the installed languages for the Front-end or Back-end.    If the parameter has a saved value this is selected when the page is first loaded.  If not, the default value (if any) is selected.  The value saved is the language tag.  For example, for English (United Kingdom) this will be 'en-GB'.
 
The '''languages''' parameter type provides a drop down list of the installed languages for the Front-end or Back-end.    If the parameter has a saved value this is selected when the page is first loaded.  If not, the default value (if any) is selected.  The value saved is the language tag.  For example, for English (United Kingdom) this will be 'en-GB'.
  
Line 15: Line 18:
 
<noinclude>
 
<noinclude>
 
=== See also ===
 
=== See also ===
* [[Standard form field types|Table of all standard form field types]]
+
* [[Standard parameter types|List of standard parameter types]]
[[Category:Standard form field types]]</noinclude>
+
[[Category:Standard parameter types]]</noinclude>

Revision as of 07:24, 21 May 2011

The "J1.5" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Params.language.jpg

The languages parameter type provides a drop down list of the installed languages for the Front-end or Back-end. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected. The value saved is the language tag. For example, for English (United Kingdom) this will be 'en-GB'.

The first option on the list is always '- Select Language -' (which is a translatable string) and is given the value 0.

  • type (mandatory) must be languages.
  • name (mandatory) is the unique name of the parameter.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • client (mandatory) is the application whose installed languages will be listed. Use site when you want to list the Front-end languages or administrator when you want to list the Back-end languages.
  • default (optional) is the default language tag. For example, 'en-GB'.
  • description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.

Example XML parameter definition:

<param name="mylanguage" type="languages" client="site" default="en-GB" label="Select a language" description="" />

See also[edit]