cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing External Resource Bundle in a Custom Code Action

Accessing External Resource Bundle in a Custom Code Action

Summary

This article shows how an external resource bundle can be accessed from inside a custom code action.

Synopsis

This article shows how an external resource bundle can be accessed from inside a custom code action.

Discussion

One can use the following notation in the installer to reference the key from the locale properties file within the external resource bundle:

$L{bundle_name.key}

where, bundle_name is the name provided in the External Resource Bundle Settings on the Project > Locales task and key is the key for the localized string to be displayed in the installer.

The above notation of referencing the key acts like an InstallAnywhere variable and the installer resolves it to the localized value based on the value of $INSTALLER_LOCALE$. For more information on this, refer to the KB article mentioned in the Additional Information Section.

Similarly the key from the external resource bundle can be referenced in a custom code action as shown below:
public void install(InstallerProxy ip) throws InstallException {
                                String newvalue=ip.substitute("$L{bundle_name.key}");
}


Additional Information

For more information on External Resource Bundles, refer to the knowledge base article: Creating, Adding and Referencing External Resource Bundles
Labels (1)
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 13, 2018 10:30 PM
Updated by: