If you know the user that should receive the mail, you know the language of the recipient. Based on this you could simply implement microflow/data logic to select the correct template to send to this user. For example add a language enum to the template and search for the templatetype with the specific language. Or am I missing something here?
Erwin is right. This is what we did in our application. Create a string. Check the user language of the recipient. For each language that you will support use a split. In this split change the string with the right getCaptions from the different enumerations. Pass the resulting string to the next step. We also have a default language when the user has a language that is not supported. So it first checks all the supported languages and then defaults to the default language.
Yes, this is a pain. We created a Java action for each enumeration (three) that had to be supported. Inputs: Enumeration, System.Language. Output: String
// BEGIN USER CODE return enumeration.getCaption(language.getCode()); // END USER CODE
I toyed with the user idea, but I found it too inelegant. Perhaps you could extend the Java code to accept String (which would have to be the getKey(enumeration) value) and System.Language inputs, and try to find the enumeration value of the string by iterating over enumerations and their values? Let me know your solution!