Oracle Help for the Web Configuration File 9-3
9.2 The brandings Element
The brandings element specifies the product branding text or image that appears above the tab bar. The brandings does not have any attributes, and is a
placeholder for all brandings information.
The brandings element can contain only one of the elements described in the following table. If no branding information is specified, the default branding text is
used.
9-4 Oracle Fusion Middleware Developers Guide for Oracle Help
Table 9–1 brandings Child Elements
Element Description
branding Renders branding information from attribute information and
can be specified to work with certain locales. This element supports the following attributes:
■
text – The text to be rendered. Note that you can provide simple HTML attributes such as italics by using the special
character named entities escape characters. For example, to preserve the italics in the name MyItalics, the branding
text line would be:
branding text=Mylt;igt;Italicslt;igt;
■
imageHeight – The image height for the branding image. If not specified, the image is displayed with default height
of 25 pixels.
■
imageSource – The image source for a branding image. This takes precedence over the text if both are set.
The declaration of an image location is not always the same as the translated path:
■
For a servlet path like foomyImage.jpg,
the translated path is context-rootfoomyIm
age.jpg
■
For an absolute path like http:mydomain.commyIm
age.jpg
the translated path is http:mydomain.commyIm
age.jpg
■
For an off the server root path like foomyImage.jpg
the translated path is foomyImage.jpg
■
imageShortDesc – A short description for the image. This text is displayed in the same way an ALT description is
handled in HTML. For example, it appears when the mouse rolls over the image.
■
locales – A space deliminated list of locales that this branding should be supplied for. If this is missing, the
branding information will be applied across all registered locales.
OHW narrows the locale used, but does not expand it. For instance, if you specified a locale nl and the browser was set to
use locale nl_NL, OHW will first try and fail to find nl_NL, then try and succeed in finding nl. Thus, if you specify a more
specific locale in OHW nl_NL and a less specific locale in the browser nl, the specification will be ignored, in alignment
with other standard locale mechanisms such as resource bundle.
Oracle Help for the Web Configuration File 9-5
For example: brandings
branding text=Oracle Help branding
or brandings
branding text=Help locales=en en_US branding text=Ayuda locales=es
brandings
or brandings
brandingFromResource resource=myApp.resource.MyBundle textKey=title brandings
9.2.1 Best Practice for Internationalization
When implementing internationalization, you can avoid having to translate ohwconfig.xml by using these best practices for helpsets that require translation:
1.
Use brandingFromResource to reference a bundle that is translated for all locales, instead of putting the branding information directly into
ohwconfig.xml. Because the branding information comes from a standard Java resource bundle, the bundle can be translated as part of the regular translation
process. brandingFromResource
Renders branding information from a ResourceBundle. This element supports the following attributes:
■
resource - Java classname of ResourceBundle to use.
■
textKey - The key into the ResourceBundle for the branding text.
■
imageSourceKey - The key into the ResourceBundle for the branding image source. This takes precedence over the
textKey is both are present.
■
imageShortDescKey - The key into the ResourceBundle for the branding image description. This
text is displayed in the same way an alt description is handled in HTML. For example, it appears when the mouse
rolls over the image.
■
locales - A space deliminated list of locales that this branding should be supplied for. If this is missing, the
branding information will be applied across all registered locales.
OHW narrows the locale used, but does not expand it. For instance, if you specified a locale nl and the browser was set to
use locale nl_NL, OHW will first try and fail to find nl_NL, then try and succeed in finding nl. As a consequence of this, if you
specify a more specific locale in OHW nl_NL and a less specific locale in the browser nl, the specification will be
ignored, in alignment with other standard locale mechanisms such as the resource bundle.
Table 9–1 Cont. brandings Child Elements
Element Description