This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Knowledge Base
- :
- Accessing External Resource Bundle in a Custom Code Action
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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
No ratings