Adding a <resources> element to the toolkit information model file
To create a toolkit that loads and formats string resources
for different locales, you must add a <resources>
element
to the toolkit information model file (info.xml).
Within the <resources>
element, one or more <messageSet>
elements
are required. Each <messageSet>
element corresponds
to one resource bundle. The <messageSet>
element
has a name
attribute, which identifies the base name
of the resource bundle. The <messageSet>
element
has one or more <lang>
elements, each of which
specifies a resource file that is included in the resource bundle.
The <lang>
element has an optional default
attribute,
which, if true, identifies that resource file as the default language.
One, and only one, <lang>
element must be specified
as the default.
Example
The following elements represent
a complete toolkit information model file (info.xml).
Within the <resources>
element, the generated
resources bundle is called MyResource.dat and
is in the impl/nl directory. The default
resource
file is MyResource.xlf and is in the impl/nl/en/en_US directory.
Two additional resource files are provided in the impl/nl/fr/fr_FR and impl/nl/tr/tr_TR directories.
<toolkitInfoModel
xmlns="http://www.ibm.com/xmlns/prod/streams/spl/toolkitInfo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cmn="http://www.ibm.com/xmlns/prod/streams/spl/common"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/streams/spl/toolkitInfo toolkitInfoModel.xsd">
<identity>
<name>My-toolkit</name>
<description>My Toolkit</description>
<version>1.0.0</version>
<requiredProductVersion>3.0.0</requiredProductVersion>
</identity>
<dependencies>
<toolkit>
<cmn:name>test-pkg</cmn:name>
<cmn:version>[4.5.6,5.2]</cmn:version>
</toolkit>
</dependencies>
<resources>
<messageSet name="MyResource">
<lang default="true">en/en_US/MyResource.xlf</lang>
<lang>fr/fr_FR/MyResource.xlf</lang>
<lang>tr/tr_TR/MyResource.xlf</lang>
</messageSet>
</resources>
</toolkitInfoModel>