<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
<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} )" ] >
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#" />
key
This attribute is required. key = String | ISML expression
Unique identifier of a localization resource as defined in a localization resource bundle.
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.
locale
This attribute is optional. locale = LocaleInformation | ISML expression
Defines the locale of the resource to be looked up. If not specified, the current template processing locale will be used.
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.