Home > Contents > Index >
XLAT.LOOKUP
A tag which looks up a locale-specific string, and encodes it appropriately for an HTML or Javascript environment.
Syntax
<XLAT.LOOKUP
KEY="localization key"
VARNAME="variable name"
[LOCALE="locale code"]
[ESCAPE="true|false"]
[ENCODE="true|false"]
[EVALALL="true|false"]
[argname="argument value"]
...
/>
Parameters
KEY (required)
- Input. The name of the key to look up in the
SystemLocaleString
table.
VARNAME (required)
- Input. The name of the variable to create with the localized and potentially encoded string.
LOCALE (optional)
- Input. The name of the locale to use for the localized string lookup (e.g.
en_US
).
ENCODE (optional)
- Input. If set to
true
(the default), the localized string will be escaped to become consistent with usage inside a standard HTML setting (e.g., an HTML attribute or text). If this is used in conjunction withescape=true
, then the localized string will be escaped in a manner consistent with usage inside both HTML and Javascript (e.g., a mouseover command inside an HTML attribute.)
ESCAPE (optional)
- Input. If set to
true
, the localized string will be escaped to become consistent with usage inside a Javascript setting (e.g., a Javascript quoted constant). If not specified, the default isfalse
. If this is used in conjunction withencode=true
, then the localized string will be escaped in a manner consistent with usage inside both HTML and Javascript (e.g., a mouseover command inside an HTML attribute.)
EVALALL (optional)
- Input. If set to
true
(the default), then all environmental variables will be substituted in the localized string. For example, "hi there Variables.myname
" would be converted to "hi there Alyssa
", if there was a variable in calledmyname
with a value ofAlyssa
.
Ifevalall
is set tofalse
, then only variables described by includedxlat:argument
tags will be substituted.
Description
This tag looks up the value of a specified key in the
SystemLocaleString
table using either the specified locale, or the value in the session variablelocale
. If the locale is still not determined, a default value ofen_US
will be used.
After lookup, the string may optionally be prepared for usage in various contexts such as Javascript or HTML.Error Numbers
There are no possible
errno
for this tag.
Examples
This code looks up the key "mykey" in Canadian French and substitutes the result into an HTML attribute. The variable "myname" is made available for the localized text to substitute:
<XLAT.LOOKUP LOCALE="fr_CA" VARNAME="localvar" KEY="mykey" ENCODE="true" ESCAPE="false" EVALALL="false" myname="Variables.mynamevar"/> <A HREF="/mylink.html" ALT="Variables.localvar" REPLACEALL="localvar">My link text</A>See Also
Home > Contents > Index > Oracle XML Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.