Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- What is your product version? 9.3
- What is your product type (Angular or MVC)? Angular
- What is product framework type (.net framework or .net core)? .net Core
I have a question as to how languages are handled as part of userMailer.cs, for example:
If I have a user who has set their default language to say es-MX and an admin who has their language set to en-GB triggers an action to send an email to the user, the email is created uses the admin language, not the language as the user. I.e. the email content is sent in English (the default language of the admin), not Spanish (the default language of the user). If the user does not speak English, then they can't understand the content of the email.
It looks like this also applies to the other userMailer functions such as TryToSendSubscriptionExpiringSoonEmail which will send the email in the host default language, not the tenant or recipient user language.
Can you confirm if this is the case and how I might approach being able to change the userMailer.cs to send the email using the language setting for the user/recipient, not the host, tenant or admin default language?
Yes, that's correct. UserEmailer will use the current session information to access the settings. You can use https://aspnetboilerplate.com/Pages/Documents/Abp-Session#user-identifier and pass target user's Id and tenantId, so UserEmailer will use correct settings for your case.