Home > Contents > Index >
XLAT.STREAM
A tag which looks up a locale-specific string, and encodes it appropriately for an HTML or Javascript environment, and streams it to the page.
Syntax
<XLAT.STREAM
KEY="localization key"
[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.
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. After encoding, it is streamed to the page.Error Numbers
There are no possible
errno
for this tag.
Example
This code looks up the key "mykey" in Canadian French and substitutes the result as link text. The variable "myname" is made available for the localized text to substitute:
<A HREF="/mylink.html"> <XLAT.STREAM LOCALE="fr_CA" KEY="mykey" ENCODE="true" ESCAPE="false" EVALALL="false"myname="Variables.mynamevar"/> </A>See Also
Home > Contents > Index > Oracle XML Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.