In this lesson, you create a properties file that contains the text for the new
field in the Catalogs tool.A properties file is a resource bundle that
contains translatable text that displays in the user interface. Resource bundles contain
locale-specific objects. By using resource bundle files, the text can be easily translated into
different languages.
Procedure
-
Create a properties file to include the warranty text to display in Management Center and
in your store:
-
In the Enterprise Explorer view, expand
-
Right-click src and select .
-
In the Name field, enter
com.mycompany.commerce.catalog.client.lobtools.properties.
-
Click Finish. The new package
com.mycompany.commerce.catalog.client.lobtools.properties is created.
-
Right-click the
com.mycompany.commerce.catalog.client.lobtools.properties package and select . Expand General. Select File and click
Next.
-
In the File name field, enter
CatalogLOB_en_US.properties, click Finish. The
CatalogLOB_en_US.properties file opens.
-
Define the properties for the warranty text to display by copying the following code into your
file:
productWarranty_ColumnHeader=Warranty term
productWarranty_TabHeader=Warranty
productWarranty_GroupTitleForWarranty=Warranty Information
productWarranty_WarrantyTermPrompt=Warranty term
productWarranty_WarrantyTypePrompt=Warranty type
productWarranty_DisplayNameForTerm1=30 days
productWarranty_DisplayNameForTerm2=45 days
productWarranty_DisplayNameForTerm3=60 days
productWarranty_DisplayNameForType1=limited
productWarranty_DisplayNameForType2=comprehensive
productWarranty_GroupTitleForOthers=Care Instructions
productWarranty_OtherPrompt=Care instructions
Note: WarrantyTerm is used in this lesson. The other properties are used in subsequent tutorial
lessons.
-
Create a duplicate of CatalogLOB_en_US.properties and name it
CatalogLOB.properties.
-
Register the new property file in the resource bundle:
-
Expand .
If the mycompany directory and subdirectory does not exist, you
must create these directories.
-
Right-click catalog and select .
-
In the File name field, enter
extCatalogManagementResourceBundle.xml.
-
Click Finish. The
extCatalogManagementResourceBundle.xml file opens.
-
Add the following code to the file:
<Definitions>
<ResourceBundle baseName="com.mycompany.commerce.catalog.client.lobtools.properties.CatalogLOB"
definitionName="cmc/catalog/ExtCatalogResources" singletonDefinition="true"/>
</Definitions>
Use
of the ExtCatalogResources
definition name is referenced in the Management Center definition files in the next lesson.
-
Save and close the file.