Developer forum

Forum » Integration » Translations doesn't work in email notifications to new users in UserProvider

Translations doesn't work in email notifications to new users in UserProvider

Jonas Krarup Dam
Reply

See title.

 

 @Translate("IntroEmailUSGreeting", "Dear") always returns "Dear"...

It seems there is no PageView set in Dynamicweb.Rendering.TemplateBase.Translate(), which means that no translations are retrieved.

Regards, Jonas


Replies

 
Nicolai Pedersen
Reply

Yes, translations are not supported outside a pageview.

What would you expect should happen with translation - what language should it use for your emails - where to get it from?

 
Jonas Krarup Dam
Reply

It might make sense to add a manual version of translate, where design name and desired language are specified:

 

Translate("key", "default value", "DesignName", "targetLanguage")


 that way, I can allow users to translate stuff in these emails, without forcing them to work on templates.

 

Regards, Jonas

 

You must be logged in to post in the forum