ISML Tag - ISTEXT

Name

ISTEXT

Short Description

used as a placeholder for localized text strings that can be provided by sites and cartridges

Table of Contents

Product Version

6.5

Product To Version


Status

final

1 Introduction

<ISTEXT> is used as a placeholder for localized text strings that can be provided by sites and cartridges.

<ISTEXT> defines a key and a locale that maps onto a localization resource. These resources are defined as key-value pairs that are stored in the format of Java property resource bundles ( *.properties files).

Cartridge-specific localization resource bundles are stored in <IS_SOURCE>/<cartridge>/staticfiles/cartridge/localizations/ from where they are read when the cartridge is loaded.

For example, a localization resource may look like this:

// <IS_SOURCE>/<cartridge>/staticfiles/cartridge/localizations/button_en.properties
buttons.apply=Apply
product.retail_set.part.text=The product {0} is currently part of another retail set {1}.
test.choice=There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}.

The numbers enclosed within curly braces designate placeholders for dynamic content to be inserted during template processing, see the parameter attribute below.

Additional description files can include descriptions of messages or contexts that can help translation agencies to identify the context of the key. These descriptions will have the same key as the translated text:

// IS_SOURCE/cartridge/staticfiles/cartridge/localizations/button_descriptions.properties
buttons.apply=A button label to apply changes in a form

During development, you may enable the continuous reloading of localization resources in your appserver.properties file:

// IS_SHARE/system/config/appserver.properties
# reloading interval 5 seconds
intershop.localization.CheckContent=5000

2 Syntax

<istext
  key = "( {String} | {ISML expression} )"
  [ encoding = "( on | off | encoding handler )" ]
  [ locale = "( {String} | {ISML expression} )" ]
  [ parameter0 = "( {String} | {ISML expression} )" ]
  [ parameter1 = "( {String} | {ISML expression} )" ]
  [ parameter2 = "( {String} | {ISML expression} )" ]
  [ parameter3 = "( {String} | {ISML expression} )" ]
  [ parameter4 = "( {String} | {ISML expression} )" ]
  [ parameter5 = "( {String} | {ISML expression} )" ]
  [ parameter6 = "( {String} | {ISML expression} )" ]
  [ parameter7 = "( {String} | {ISML expression} )" ]
  [ parameter8 = "( {String} | {ISML expression} )" ]
  [ parameter9 = "( {String} | {ISML expression} )" ]
>

3 Example

The following example illustrates the usage of the <ISTEXT> tag in an ISML template:

<istext key="product.retail_set.part.text" parameter0="#Product:SKU#" parameter1="#RetailSet:SKU#" />
<istext key="test.choice" locale="#Locale#" parameter0="#CountOfFiles#" />

4 Attributes

4.1 key

This attribute is required.
key = String | ISML expression
Unique identifier of a localization resource as defined in a localization resource bundle.

4.2 encoding

This attribute is optional.
encoding = on | off | encoding handler
Specifies the encoding scheme to be used. For more details on how to use encoding types supported by Intershop or add a custom encoding type see: Cookbook - Encoding.

The default is on with HTML encoding.

4.3 locale

This attribute is optional.
locale = String | ISML expression
Defines the locale of the resource to be looked up. If not specified, the current template processing locale will be used.

4.4 parameter0 .. parameter9

These parameters are optional.
parameter<position> = String | ISML expression
Specifies a parameter to be injected into the returned string at the given position.

Reference - ISML Tags

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets