How to localize your add-in


Summary Localizing your add-in in Eclipse allows you to represent graphical user interface (GUI) components with a specific geographical, political, or cultural region language. The following document will discuss the two cases of localizing your add-in. The first case examines how to deploy an add-in for a single language, while the second case examines 2 or more languages.

In this topic


Creating and deploying an add-in with a single language

To localize an add-in for a single language, the workflow follows what is discussed in detail in the following documentation topics:
The only difference from the preceding workflow documents is that you will enter values for all the properties in the specified language of choice. For example, if you wished to create a German add-in, then you would simply follow the same workflows presented and type German directly into the add-in view in the add-in editor or directly into config.xml file. By default, the config.xml is the configuration file that will be used by any operating system and thus all the language specific content can be placed directly into this file.

The deployment story also remains the same following the workflow presented in How to deploy your add-in.

Creating and deploying an add-in with 2 or more languages

In this instance, your add-in must now be able to support the possibility of more than a default language (as is assumed in Case 1). For example, you want to support English, German, and Canadian French for your add-in, where English is the default language. The workflow in this scenario is as follows:
  1. Define default locale
  2. Localize Java class definitions
  3. Translate the config.xml
  4. Deploy add-in with Eclipse

Defining a default locale

As instructed in Case 1, refer to the existing documentation and create your add-in using the workflows already in existence. In this scenario, you would use English for the values of properties when defining the config.xml for your add-in project. Any language can be used as the default in this scenario.

Localizing Java class definitions

The Java classes that you might potentially define for your add-ins (for example: buttons, tools, combo boxes, and so on) will need to be localized following standard Java practices. Consult Oracle for their extensive documentation on this subject.

Translating the config.xml

Because the config.xml will have property values that are used by the ArcGIS Desktop software products, this file will also need to be translated for each language that is required. In the preceding example, this would mean German and French. In this instance, two new eXtensible Markup Language (XML) files must be created and filled in with the appropriate language:
  1. For German, the xml file would be: config.DE_DE.xml
  2. For French, the xml file would be: config.fr_CA.xml
The naming convention followed should follow what is expected by the ArcGIS Desktop product that will use the add-in. The user documentation help system can be consulted for the specific language and country code information.

Deploying the add-in with Eclipse

Once the XML files have been translated and defined following the ArcGIS Desktop standard, the final step must package all the files into the .esriaddin file so it can be used by the user (this includes both XML files and Java property files). The following are steps that can be followed to achieve this following the preceding example (assumes two files have been created and defined for the respective languages: config.DE-DE.xml and config.fr-CA.xml):
  1. Add the two configuration files to your Eclipse project at the root level (direct descendents of the Eclipse project). Leave the default config.xml file as is.

    Notice the three configuration files in the project folder and their location. In this instance the add-in project was created and defined for ArcMap.
  1. Select the export option in the Eclipse add-in editor.
  1. In the JAR export wizard, make sure to check the boxes for the two new XML configuration files as illustrated in the following figure:

    By default the config.xml file is already checked; however, the additional XML files are not.
  1. Click finish to export to the .esriaddin file.
By default the JAR export wizard automatically deploys to the well-known location that is monitored by ArcGIS Desktop applications. Use the browse button on the JAR export wizard to change the default location as needed. If this is done, then ensure that the .esriaddin file extension remains intact.






Development licensing Deployment licensing
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo