Add Support for a New Language

This task describes how to add support for a new language.

  1. Add a Resource Bundle (*.properties Files)

    Add a resource bundle according to the job that is to be run. The following table lists the DFM jobs and the resource bundle that is used by each job:

    Job Base Name of Resource Bundle
    File Monitor by Shell langFileMonitoring
    Host Resources and Applications by Shell langHost_Resources_By_TTY, langTCP
    Hosts by Shell using NSLOOKUP in DNS Server langNetwork
    Host Connection by Shell langNetwork
    Collect Network Data by Shell or SNMP langTCP
    Host Resources and Applications by SNMP langTCP
    Microsoft Exchange Connection by NTCMD, Microsoft Exchange Topology by NTCMD msExchange
    MS Cluster by NTCMD langMsCluster

    For details on bundles, see Work with Resource Bundles.

  2. Declare and Register the Language Object

    To define a new language, add the following two lines of code to the shellutils.py script, that currently contains the list of all supported languages. The script is included in the AutoDiscoveryContent package. To view the script, access the Adapter Management window. For details, see Adapter Management Window.

    1. Declare the language, as follows:

      LANG_RUSSIAN = Language(LOCALE_RUSSIAN, 'rus', ('Cp866', 'Cp1251'), (1049,), 866)

      For details on class language, see API Reference. For details on the Class Locale object, see http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Locale.html. You can use an existing locale or define a new locale.

    2. Register the language by adding it to the following collection:

      LANGUAGES = (LANG_ENGLISH, LANG_GERMAN, LANG_SPANISH, LANG_RUSSIAN, LANG_JAPANESE)
      

Parent topic: Support Localization in Jython Adapters