40 Customizing Billing Care Labels

This chapter provides an overview of customizing Oracle Communications Billing Care labels.

About the Billing Care Resource Bundle

Billing Care uses an XML Localization Interchange File Format (XLF) file resource bundle for customization of Billing Care labels and localization. The default English language XLF file (BillingCareResources_en.xlf) is available in the SDK_home/BillingCare_SDK/references folder, where SDK_home is the directory where you installed the SDK. This file contains Billing Care key-value mappings for Billing Care labels, organized into functional group elements.

Customizing the Resource Bundle

Customize the Billing Care labels by creating a custom XLF file containing your label values. After creating your XLF file, use the orai18n-js.jar, included in the Billing Care SDK, to generate the required JavaScript files for the customizations shared library deployed in the Billing Care domain.

The following XLF customizations are supported:

Creating a Custom XLF File

Label customizations are configured in a custom XLF file.

To create a custom XLF file:

  1. Create the customized_en.xlf file in your myproject/web/resources/translation/ directory, where myproject is your NetBeans IDE project containing your Billing Care customizations.

  2. Open the customized_en.xlf file in an editor and add the following text:

    <?xml version="1.0" encoding="utf-8" ?>
    <xliff version="1.0">
    <file original="test_en.js" source-language="EN-US" target-language="EN-US" datatype="JavaScript">
    <header/>
    <body>
    </body>
    </file>
    </xliff>
    

Modifying Existing Labels

Modify an existing label by adding a group element in your custom XLF file containing <trans-unit> elements for the labels you are changing. <trans-unit> elements specify the source and target of a label to modify. For more information on the <trans-unit> element, see:

http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#trans-unit

Example 40-1 shows a sample <trans-unit> element.

Example 40-1 Sample trans-unit Element for Modifying an Existing Label

<group id="common" restype="common">
   <trans-unit id="INVALID_VALUE" translate="yes">
      <source>Invalid MODIFIED</source>
      <target>Invalid MODIFIED</target>
   </trans-unit>
</group>

To modify existing labels:

  1. In the body section of the customized_en.xlf file, add a group element with the same name as the label you want to update (for example, common).

  2. Add a <trans-unit> element using the same label name as the default label you are modifying.

  3. Add the new custom label (for example, Invalid MODIFIED).

  4. Save your customized_en.xlf file.

Adding New Labels

Add new labels by adding a custom_extensions group containing your new labels in your customized_en.xlf file.

Example 40-2 shows a sample new <group> element.

Example 40-2 Sample group Element for Adding New Label

<group>
<group id=”custom_extensions” restype=”sdk”>
<trans-unit id="TEST_CUSTOM" translate="yes">
<source>Custom New Value</source>
<target>Custom New Value</target>
</trans-unit>
</group>

To add a new label:

  1. Add a new <group> element with a custom_extensions <group id> value in your customized_en.xlf file inside the <body> element. See the BillingCareResources_en.xlf file for group element examples.

    Note:

    The <group id> must be custom_extensions.
  2. Add the new labels inside your <group> element.

  3. Save your customized_en.xlf file.

Creating Required JavaScript Files for Deployment

After completing your label customizations, generate the required JavaScript files to add to your customizations shared library deployed to the Billing Care domain.

To generate the required JavaScript files:

  1. Add the customized_en.xlf and default CustomerCareResrouces_en.xlf files to the myproject/web/resources/translation folder, where myproject is the NetBeans IDE project folder containing your Billing Care customizations.

  2. Open a shell or command window, and change directory to the myproject/web/resources/translation folder.

  3. Enter the following command using an absolute path to the orai18n-js.jar.

    java –jar full_path/orai18n-js.jar –from XLF –to JS -file BillingCareResources_en.xlf Customized_en.xlf
    

    where full_path is the directory where orail8n-js.jar is stored. This jar is included in the SDK_home/BillingCare_SDK/libs directory.

    Two JavaScript files are created. One file contains the default resources of Billing Care, and the other file contains your customizations.

  4. Delete the BillingCareResources_en.xlf file.

  5. Package and deploy your resource bundle customizations to your Billing Care domain.

    For more information, see "Packaging and Deploying Customizations".

  6. Verify your changes in Billing Care.

Localizing Billing Care into Other Languages

Billing Care can use an alternative language labels through translation of the BillingCareResources_en.xlf file into another language. For example, create a file named BillingCareResources_is.xlf file to localize Billing Care in Icelandic.

To configure Billing Care with an alternative language localization:

  1. Translate the BillingCareResources_en.xlf file into a version specific to the language you are enabling. For example, create a file named BillingCareResources_XX.xlf where XX is the two character language code you are enabling.

  2. Copy the BillingCareResources_XX.xlf file to the myproject/web/resources/translation directory where myproject is your NetBeans IDE project directory containing your Billing Care customizations.

  3. Run the conversion utility using the orail8n-js.jar to create the JavaScript for the language you are enabling using the following command:

    java -jar full_path/orai18n-js.jar -from XLF -to JS -file CustomerCareResources_XX.xlf
    

    where full_path is the directory where orail8n-js.jar is stored. This jar is included in the SDK_home/BillingCare_SDK/libs directory.

  4. Package and deploy your resource bundle customizations to your Billing Care domain.

    For more information, see "Packaging and Deploying Customizations".

  5. Verify your changes in Billing Care.