Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User language in velocity templates

Luca January 21, 2021

Hi, I am customising templates for sending automatic e-mails to customers when they open a new ticket.

image.PNG

Our customers have different native languages. So I would like the automatic e-mail to be in the right language. However, I cannot access the information from the velocity template.

I have tried to access the class UserPreferencesManager but it is not accessible from velocity. I also tried to search for the class with $content but it is also not accessible from velocity. In UserPropertyManager I didn't find a language property.

Does anyone know a way to do this?

1 answer

1 accepted

1 vote
Answer accepted
brbojorque
Community Champion
January 21, 2021

Hi @Luca ,

I kind of experienced the same issue with yours actually, I'm trying to access something from the JAVA API but it was not accessible from the plugin. 

What I did is contact the add-on vendor and have then double-checked if the user preference is accessible in the velocity template the last time they've added it.


Luca January 21, 2021

Thanks for your advice. I spoke to the vendor and he told me that it is most likely not possible to find the customer's language in velocity templates.

brbojorque
Community Champion
January 21, 2021

Hi @Luca ,

I'm not sure if this helps but the workaround is to add a customfield language and have the condition around that new language custom field in the velocity.

The downside is you have to update them manually for each issues unless you have an automation to set it up based on the user, group, or other factors.

Like Luca likes this
Luca January 25, 2021

Thanks for the advice. I solved my problem in this way!

brbojorque
Community Champion
January 25, 2021

Hi @Luca , if you don't mind can you accept my answer so other people can find it helpful as well :)

Like Luca likes this

Suggest an answer

Log in or Sign up to answer