Basic Syntax CrystalClear Syntax Before Reading Records

Translate( String )
Translate( String, String[] )


Basic and Crystal Syntax

Usage:

Translate( string )
Translate( string, string array )

Parameters:

String This is the key of the translated text defined in the language properties files.
string array (optional) These are the values to replace the placeholders in the string to be translated.

Returns:

String

Description:

With this function you can use the ResourceBundle defined in your i-net Clear Reports configuration with "LanguageResource" which allows you to create multi language reports. Usually i-net Clear Reports will only replace the defined keys (in the language property files) inside text elements. With this function you're now able to translate strings inside formulas as well. If no ResourceBundle can be found for the requested language the default language of the system i-net Clear Reports is running on will be used. If no ResourceBundle can be found the original string passed to this function will be returned.

After translation, if an array is given, the placeholders in the translated string, if any, are replaced one by one by the strings in the array given. The placeholders need to be of the form "{0}", "{1}", that is, 0-based. If there are more placeholders than strings given, the extra placeholders will remain in the string. If there are more values than placeholders, the extra values are ignored.

Examples:

Example 1: Translate static string

Example 2: Translate string with parameter (placeholder)

See also:


i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to crystalclear@inetsoftware.de.

This page is: very poor very good
Comment: