In this topic
- Creating and deploying an add-in for one language
- Creating and deploying an add-in for multiple languages
Creating and deploying an add-in for one language
To localize an add-in for one language, the workflow follows the discussions in the following topics:
- ArcGIS for Desktop customizations using add-ins
- How to create an add-in project in Eclipse
- How to deploy your add-in
The only difference from the preceding workflow topics is that you will add values for all the properties in the specified language of choice. For example, if you want to create a German add-in, follow the same workflows and type German into the add-in view on the add-in editor, or directly into the config.xml file. By default, the config.xml file 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 scenario also remains the same following the workflow in the previously referenced topic, How to deploy your add-in.
Creating and deploying an add-in for multiple languages
In this instance, your add-in must now be able to support the capability of more than a default language, for example, supporting English, German, and Canadian French for your add-in, where English is the default language. This topic discusses the workflow in this scenario.
Defining a default locale
Refer to the existing topics and create your add-in using the workflows already in existence. In this scenario, use English for the values of properties when defining the config.xml file 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) need to be localized following standard Java practices. For more information, see the Oracle Web site.
Translating the config.xml file
Because the config.xml file will have property values that are used by ArcGIS for Desktop applications, this file also needs to be translated for each required language. In the preceding example, this means German and French. In this instance, two new Extensible Markup Language (XML) files must be created and completed with the appropriate language as follows:
- config.DE_DE.xml—German XML file
- config.fr_CA.xml—French XML file
The naming convention used should follow what is expected by ArcGIS for Desktop applications that 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 standards for ArcGIS for Desktop applications, 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).
Do the following steps to achieve the preceding example (assumes two files have been created and defined for the respective languages, config.DE-DE.xml and config.fr-CA.xml):
- Add the two configuration files to your Eclipse project at the root level (direct descendents of the Eclipse project). Do not change the default config.xml file. See the following screen shot:
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.
- Select the export option on the Eclipse add-in editor.
- On the Java Archive (JAR) file Export wizard, make sure to select the check boxes for the two new XML configuration files. See the following screen shot:
By default, the config.xml file is already selected; however, the additional XML files are not.
Click Finish on the wizard to export to the .esriaddin file.
By default, the JAR Export wizard automatically deploys to the well-known location that is monitored by ArcGIS for Desktop applications. Click the Browse button on the JAR Export wizard to change the default location as needed. If this is done, ensure that the .esriaddin file extension remains intact.
|Development licensing||Deployment licensing|
|ArcGIS for Desktop Basic||ArcGIS for Desktop Basic|
|ArcGIS for Desktop Standard||ArcGIS for Desktop Standard|
|ArcGIS for Desktop Advanced||ArcGIS for Desktop Advanced|