You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In IS 7.0 the claim 'Local' (http://wso2.org/claims/local) is used to identified the user's preferred locale to send email in the specified locale. However this is not working as expected in IS 7.0
Regardless of which locale the user has in the claims, the email will be sent only in the default english (en_US) language.
Steps to Reproduce
Add the Local claim value of a user to another local (fr_FR )
Customize any Email template type with a france locale (Admin Initiated Password Reset)
Trigger the user an admin forced password reset through the console
The received email will be in the en_US locale not in fr_FR locale
Analysis
In the identity.event.handler.notification.util.NotificationUtil class userClaims.get(NotificationConstants.EmailNotification.CLAIM_URI_LOCALE) method correctly fetches the locale[1] as fr-FR
However in the NotificationHandlerDataHolder.getInstance().getEmailTemplateManager()
.getEmailTemplate(notificationEvent, locale, applicationDomain); method even though the correct locale is passed which is fr-FR, the 'emailTemplate ' value is returned always with the en-US locale[2]
This causes the notification email to be sent in English rather than in french
Description
In IS 7.0 the claim 'Local' (http://wso2.org/claims/local) is used to identified the user's preferred locale to send email in the specified locale. However this is not working as expected in IS 7.0
Regardless of which locale the user has in the claims, the email will be sent only in the default english (en_US) language.
Steps to Reproduce
Analysis
.getEmailTemplate(notificationEvent, locale, applicationDomain); method even though the correct locale is passed which is fr-FR, the 'emailTemplate ' value is returned always with the en-US locale[2]
This causes the notification email to be sent in English rather than in french
Version
IS 7.0
[1] https://github.com/wso2-extensions/identity-event-handler-notification/blob/v1.8.6/components/event-handler-notification/org.wso2.carbon.identity.event.handler.notification/src/main/java/org/wso2/carbon/identity/event/handler/notification/util/NotificationUtil.java#L640
[2] https://github.com/wso2-extensions/identity-event-handler-notification/blob/v1.8.6/components/event-handler-notification/org.wso2.carbon.identity.event.handler.notification/src/main/java/org/wso2/carbon/identity/event/handler/notification/util/NotificationUtil.java#L655
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: