Localization of plugin

Hi @kumark41 ,

It is important that the technical name of the plugin and the name of the messages files match, and please make sure that the messages folder is included in the root of the zip file, when it is built.

To test the localization, I have created a simple plugin using the IIQDA. The IIQDA generates an Ant script to build the plugin, but it did not include the messages folder.

I had to add a messages folder under the web folder and update the build.xml to include that. After that, I was able to display a message in English or Dutch on the plugin pages (<<IIQ_BASE_URL>>/plugins/pluginPage.jsf?pn=localizationtestplugin, e.g. http://localhost:8080/identityiq/plugins/pluginPage.jsf?pn=localizationtestplugin).

  <target name="package" depends="compile,generateDTD" description="Output zip file overlay to build/dist dir">
    <mkdir dir="${overlay}/jars" />
    <buildnumber file="build.num"/>
    <jar destfile="${overlay}/jars/${pluginname}.jar">
      <fileset dir="build/classes">
        <include name="**/**" />
      </fileset>
      <!-- this will add resources that were in the src area for getResourceAsStream calls -->
      <fileset dir="src">
        <exclude name="**/*.java" />
      </fileset>
    </jar>
    <copy todir="${overlay}">
      <fileset dir="web">
        <include name="manifest.xml"/>
        <include name="ui/**"/>
<!-- START ADDITION: Include messages from the web folder -->
        <include name="messages/**"/>
<!-- END ADDITION -->
      </fileset>
      <fileset dir=".">
        <include name="import/**"/>
        <include name="db/**"/>
      </fileset>
    </copy>

    <xmltask source="${overlay}/manifest.xml" dest="${overlay}/manifest.xml" outputter="default" preservetype="true">
      <xmlcatalog>
        <dtd publicId="sailpoint.dtd" location="${dtd}" />
      </xmlcatalog>
      <replace path="//Plugin/@version" withText="${version}.${build.number}" />
    </xmltask>
    <zip basedir="${overlay}" destfile="build/dist/${pluginname}.${version}.${build.number}.zip" />
  </target>

This example plugin is here: LocalizationTestPlugin