Localize the Sterling Business Intelligence report literals

You can localize the Sterling Business Intelligence report literals according to the standards of your location.

Before you begin

You need to install Ant and set the appropriate environment variables before you localize the literals.
  • Create a new environment variable called ANT_HOME. Set this variable to the location where Ant is installed.
  • Create a new environment variable called JAVA_HOME. Set this variable to the location where Java is installed.
  • Update the PATH environment variable to include the directory where the Ant binaries are located. For example, if Ant is installed in C:\<ant_install_dir> directory, add C:\<ant_install_dir>\bin to the PATH environment variable.
  • Update the PATH environment variable to include the directory where the Java binaries are located. For example, if Java is installed in C:\Java, add C:\Java\bin to the PATH environment variable.

About this task

To localize the report literals, perform the following tasks:

Procedure

  1. Open the <BI_COGNOS_HOME>/resources/sbianalyticsbundle.properties file from the <BI_COGNOS_HOME>/resources folder and save it as <BI_COGNOS_HOME>/resources/sbianalyticsbundle_<language>_<locale>.properties.
  2. Each resource bundle contains a <key>=<value> pair, where key is the resource key, and value is the literal displayed for the corresponding locale. Replace <value> with the translated value.
  3. Save the modified file. If the file is in UTF-8 format, convert it to ASCII by running the native2ascii command as follows:

    native2ascii -encoding UTF-8 <source file> <target file>

    The file is returned in the following format:

    <filename>_<2 letter code for language as given by ISO 639>_<2 letter code for territory as given by ISO 3166>.<file extension>

    For example, sbianalyticsbundle.properties is returned as sbianalyticsbundle_fr_FR.properties.

    Note: Files localized in Latin1 languages do not require this conversion.

What to do next

To localize the reports literals, perform the following tasks:

  1. Ensure that the environment variables COGNOS_URL, COGNOS_LIB, and BI_COGNOS_HOME are set.

    For example in UNIX,

    export BI_COGNOS_HOME = <BI_COGNOS_HOME>

    export COGNOS_URL = http://<ip_address>:<port>/p2pd/servlet/dispatch

    export COGNOS_LIB = <COGNOS_HOME>/<c_path>/webapps/p2pd/WEB-INF/lib

    Here,

    COGNOS_URL
    Points to the dispatcher url. The <ip_address> points to the ip address of machine on which Analytics server is installed.
    BI_COGNOS_HOME
    The root directory where the Business Intelligence content for Analytics is installed.
    COGNOS_LIB
    Points to the directory, <COGNOS_HOME>/<c_path>/webapps/p2pd/WEB-INF/lib which contains the following JAR files:
    • activation.jar
    • axis.jar
    • axisCrnpClient.jar
    • CAM_AAA.jar
    • CAM_AAA_CustomIF.jar
    • commons-discovery-0.2.jar
    • commons-logging-1.1.jar
    • dom4j-1.6.1.jar
    • jaxrpc.jar
    • mail.jar
    • saaj.jar
    • soap.jar
    • wsdl4j-1.5.1.jar
    • xalan.jar
    • xercesImpl.jar
    • xml-apis.jar

    The JAR files are copied to the <BI_COGNOS_HOME>/lib folder, when you run the sbilocalizer.xml ANT script.

    Important: For successful report literal localization, ensure that all the above mentioned JAR files are present in the COGNOS_LIB directory.
  2. Enable Cognos Anonymous Access as follows:
    1. Launch Configuration. Click Security > Authentication> Cognos.
    2. Click the Value box for Allow anonymous Access , select True. From the File menu, click Save.
    3. Restart the Analytics server.
  3. To localize the literals in the <BI_COGNOS_HOME> folder, run the following command from the <BI_COGNOS_HOME>/bin folder:

    ant -f sbilocalizer.xml import

    Note:
    • The sbilocalizer.xml file can be run in the following modes:

      ant -f sbilocalizer.xml validate, to validate the literals in the sbianalyticsbundle_<language>_<locale>.properties file.

      ant -f sbilocalizer.xml extract, to export the literals.

    Note: The sbilocalizer.xml command reads all the bundles in the <BI_COGNOS_HOME>/resources folder. It then adds the literal translations for each locale into the reports definitions present in the <BI_COGNOS_HOME>/reports folder. The modified definitions are copied into the <BI_COGNOS_HOME>/localizedreports folder, and added into the content repository. When the reports are generated again, the literals are displayed according to the user's locale.
  4. Disable Cognos Anonymous Access as follows:
    1. Launch Configuration. Click Security > Authentication> Cognos.
    2. Click the Value box for Allow anonymous Access , select False. From the File menu, click Save.
    3. Restart the Analytics server.
Tip: After running sbilocalizer.xml, the report owner is set to Anonymous. For more information about modifying the report owner using Cognos® Connection, see General Properties.