How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Language parameter for localAPI function



Unfortunately, if we use, for example, the "OpenTicket" with localAPI, the language is not set correctly for the outgoing email template to the guest user.

I'm not sure it's brilliant to have email templates ignore the user language -- people generally prefer getting emails written in their own language.

In the end, we managed to set a hook for sending emails and set the language by checking the domain of the guest user (we use separate domains for each language, although could have used a passed hidden variable from the WP form).

Then passed the language variable to the email template, but of course, had to duplicate all of the foreign language into the main english body in the email template, doing an "{if $en}{else}{/if}. That has to be duplicated across all other email templates triggered by a local API call too ... which is perhaps not a sustainable workaround.

This is a bit of work ... would indeed be easier if we could simply pass a language code parameter to the localApi function.

Thanks!

Post the first comment

Login to post a comment.