Start page / Template development / Forms / Data elements / OPTIONS / LANGUAGE

Type LANGUAGEAvailable from FirstSpirit Version 4.2

Contents
for example

Using the type LANGUAGE the languages, defined in the project, can be inserted automatically into set-valued input components (which allow to select from several values, e. g. CMS_INPUT_COMBOBOX).

type
IncludeType
Mandatory
lang
String
Mandatory
<CMS_INCLUDE_OPTIONS></CMS_INCLUDE_OPTIONS>

Parameter

The CMS_INCLUDE_OPTIONS tag is a container with which configurations can be specified to automatically insert entries in an input component.

ParameterMandatorySinceTypeDefault value
type*Yes4.2IncludeTypeNone

type

The mandatory parameter type is used to give the type of value or content inclusion.

The following types are supported:

  • LANGUAGE: output of project languages
  • TEMPLATESET: output of the project's template sets
  • DATABASE: output of the content of data sources
  • PUBLIC: output of the content which is made available via a public interface

  • Optional parameters
    Further optional and mandatory parameters or tags can be used with these types (see below).

Type LANGUAGE

Using the type LANGUAGE the languages, defined in the project, can be inserted automatically into set-valued input components (which allow to select from several values, e.g. CMS_INPUT_COMBOBOX).

  • Mandatory parameters
    The tag LANGUAGE does not need any other parameter.
  • Optional parameters
    You can use the tags LABELS / LABEL with the tag LANGUAGE (see below).

Type TEMPLATESET

Using the type TEMPLATESET the output template sets which are defined in the project can be inserted automatically into a set-valued input component (e.g. CMS_INPUT_COMBOBOX).

  • Mandatory parameters
    The tag TEMPLATESET does not need any other parameter.
  • Optional parameters
    You can use the tags LABELS / LABEL with the tag TEMPLATESET (see below).

Type DATABASE

Using the type DATABASE data sets of an external table can be inserted automatically into a set-valued input component (e.g. CMS_INPUT_COMBOBOX).

  • Mandatory parameters
    The data source from which the data sets are to be selected must be specified by the tag TABLE (see below).
  • Optional parameters
    You can use the tags KEY and LABELS / LABEL with the tag DATABASE (see below).

Type PUBLIC

With FirstSpirit you can develop and implement own modules. Using the type PUBLIC interfaces ("HotSpots") of the type "Public" can be addressed (for further information about this component type and about the development of modules in FirstSpirit please see Module Architecture / Component Model.

  • Mandatory parameters
    The name of the HotSpot class must be specified by the tag NAME (see below).
  • Optional parameters
    You can use the tags PARAMS / PARAM and LABELS / LABEL with the tag PUBLIC (see below).

ParameterMandatorySinceTypeDefault value
type*Yes4.2IncludeTypeNone

LABELSAvailable from FirstSpirit Version 4.2

A language-dependent label for the values of one type can be defined by using the tag LABELS.

One LABEL tag must be specified for each language.

WARNING: At least a definition for the fall back labelling ("*") must be given:

<LABELS>
<LABEL lang="*">...</LABEL>
</LABELS>

LABELAvailable from FirstSpirit Version 4.2

A flexible, language-dependent labelling can be defined for the individual options in each language using the tag LABEL.

For defining the labelling for a language, the abbreviation of the respective project language must be given with the parameter lang:

...
<LABEL lang="DE">...</LABEL>
<LABEL lang="EN">...</LABEL>
...

Return values are specified by using the special language abbreviation * ("for all languages"):

...
<LABEL lang="*">...</LABEL>
...

The parameter lang is a mandatory parameter.

The labelling text is given within an opening and closing <LABEL> tag (see place holder TEXT).

ParameterMandatorySinceTypeDefault value
lang*Yes4.2StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see Language templates (→Documentation for Administrators)) to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes4.2StringNone

TEXTAvailable from FirstSpirit Version 4.2

At this point the labelling text of the values, from which the editor can select, is defined.

For this purpose the system object #item is at your disposal. The labelling can be output dynamically by using this system object.

In the case of the data type DATABASE #item specifies e.g. which row of the database, which is defined by the tag TABLE, is to be displayed. One column of the database row can be used for the labelling, separated by a dot, e.g. #item.Headline_EN.

Furthermore, language-specific endings are added automatically by means of the expression mechanism, if they are existing. I.e. the following definition can be given:

<CMS_INCLUDE_OPTIONS type="DATABASE">
<TABLE>Products.press_releases</TABLE>
<LABELS>
<LABEL lang="*">#item.Headline + ", " + #item.Subheadline</LABEL>
</LABELS>
</CMS_INCLUDE_OPTIONS>

Here, first attributes with language extension are looked for, depending on the language in which the project is to be generated (e.g. #item.Headline_EN for the language EN), and then, if no language extension can be found, attributes with a given name are looked for.

Important Please pay attention that the column name is specified correctly and that the columns really exist in the specified table. Otherwise there will not be displayed any values for selection. If using KEY please pay attention that the labelling, which is defined dynamically via LABEL and #item, fits to the column, which is defined via KEY. Otherwise, the editor gets a corresponding error message when selecting an option.

Key

IncludeType

Type of value or content inclusion

TEMPLATESETAvailable from FirstSpirit Version 4.2

List of the template sets defined in the project

LANGUAGEAvailable from FirstSpirit Version 4.2

List of the project languages

DATABASEAvailable from FirstSpirit Version 4.2

Data sets from an external table

PUBLICAvailable from FirstSpirit Version 4.2

Data via interfaces ("HotSpots") of the type "Public"

String

A random character string

Example

Example for the use of CMS_INCLUDE_OPTIONS, type LANGUAGE:

<CMS_INPUT_COMBOBOX name="IDENTIFIER" useLanguages="NO">
<CMS_INCLUDE_OPTIONS type="LANGUAGE">
<LABELS>
<LABEL lang="*">#item.abbreviation</LABEL>
</LABELS>
</CMS_INCLUDE_OPTIONS>
<LANGINFOS>
<LANGINFO lang="*" label="TEXT" description="TEXT"/>
<LANGINFO lang="EN" label="TEXT" description="TEXT"/>
</LANGINFOS>
</CMS_INPUT_COMBOBOX>

This example will return a combobox with the label TEXT from which the available languages in the project (e.g. "DE", "EN" etc.) can be selected.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy