N
Novu15mo ago
SuPP

Changing the translation for notification

Hello everyone, please tell me if it is possible to implement a change of notification translation? It's about InApp Content inside InApp:
{{#equals lang 'ru'}}
{user_name} опубликовал новую запись {content_type}
{{else}}
{user_name} posted a new {content_type}
{{/equals}}
{{#equals lang 'ru'}}
{user_name} опубликовал новую запись {content_type}
{{else}}
{user_name} posted a new {content_type}
{{/equals}}
And I would like to be able, for example, when requesting a list of notifications, to set in which locale to receive them... Or something like that...
2 Replies
Pawan Jain
Pawan Jain15mo ago
Hi @suppmkl In code snippet you shared Is lang a payload variable? If yes, above code snippet is best approach to have different message based on variable currently We are working on translation management feature, Would love to know your complete usecase
SuPP
SuPPOP15mo ago
yes the lang field from payload I will describe the case of the problem: 1) The user has the ru locale enabled, he receives the first notification in Russian 2) Then he switches the locale to en, and he receives a second notification as a result, he has two notifications in different languages in his message history {content_type} this is for rendering Vue elements on the front side for example user_name will render RouterLink
Want results from more Discord servers?
Add your server