How to get resource bundle (for localization) in custom workflow process step

Avatar

Avatar

Sumit1191

Avatar

Sumit1191

Sumit1191

18-12-2020

How to get i18Dictionary object in custom workflow process step?

Following points tried :
1. As we dont have slingHttpRequest object exists so can not get resource bundle using request.
2. ResourceBundle rb = ResourceBundle.getBundle("projectName");
3. ResourceBundle rb = ResourceBundle.getBundle("project full qualified name");

View Entire Topic

Avatar

Avatar

KiranVedantam1992

Avatar

KiranVedantam1992

KiranVedantam1992

18-12-2020

The I18n class has 2 constructors:

1. To present the string in the language that is specified in the user account

I18n i18n = new I18n(slingRequest);

2. For using the page locale:

Locale pageLang = currentPage.getLanguage(false);
ResourceBundle resourceBundle = slingRequest.getResourceBundle(pageLang);
I18n i18n = new I18n(resourceBundle);

 

Can you let me know how are you planning to trigger the workflow? Are you not using the servlet?

 

Thanks,

Kiran Vedantam.