OScript API/Built-in Package Index |
An xlate is a localized string. Each xlate consists of a group and a name. All xlates are defined in xlate databases, which are stored as text properties files.
XLate group was not found
XLate name was not found
Generic xlate error
Create a new xlate
Finish custom xlates
Determine if the given string represents an xlate
Get the list of open xlate databases associated with a module
Load custom xlates
Load xlates for newly enabled languages
Find an xlate with the given group and name
Return the group and name associated with the xlate
Open an xlate database file
Open an xlate database file associated with a module or an object
Reset the xlates for a given module
XLate group was not found
XLate name was not found
Generic xlate error
Create a new xlate object with a specified name within a specified group
Group to which the xlate belongs
Name of the xlate
A localized string associated with the group and name
Call this after all ospaces are loaded to add unclaimed xlates. An unclaimed xlate is one which does not appear in another properties file. Takes no parameters, iterates through all installed locales.
TRUE if successful
XLate.IsXLate() will determine if the given object is indeed an xlate. If the lookup parameter is TRUE, then it will also determine if the xlate is defined.
An xlate
Whether to lookup to see if the xlate has been defined
TRUE if the object is an xlate, and optionally whether it has been defined
if ( XLate.IsXLate( [EXAMPLEMODULE_HTMLLABEL.MessageText], TRUE ) ) Echo( 'The xlate was found' ) end
This function is used to get the list of open xlate databases associated with a module, or all open databases for all modules.
Module name
A list of lists, each entry containing a module name and the path to the database file
Automatically called when locale is added or may be called with custom path for testing When locale is first added, $OTHOME/config/custom_strings is checked for locale-specific files.
locale
optional path
TRUE if successful
This function will check if all xlates of enabled languages have been loaded and automatically load any missing ones. Note that it is automatically called by the engine at the end of every request. Thus, there is no need to call this function for front end llserver threads. However, agent threads may call this when they see it necessary or beneficial.
TRUE if successful
This function is used to find an xlate with the given name, within the specified group.
Group to which the xlate belongs
Name of the xlate
A localized string associated with the group and name, or an error message if the xlate was not found
Returns a list that contains the xlate group name and name
An xlate
A two-element list containing the group name and xlate name
List names = XLate.Names( [EXAMPLEMODULE_HTMLLABEL.MessageText] ) // Will return { 'EXAMPLEMODULE_HTMLLABEL', 'MessageText' }
Open an xlate database file
The name of the module
Path to the database file
TRUE if the file could be opened
Boolean result = XLate.Open( 'examplemodule', 'C:\\OPENTEXT\\module\\examplemodule\\ospace' )
Open an xlate database file associated with a module or an object
The name of a module, or an object reference
Undefined
Reset the xlates for a given module
The name of the module
TRUE if successful
Copyright © 2023 OpenText Corporation. All rights reserved. |