Having a problem with site emails being sent out using the wrong language. Our site uses French and English, but always sends our emails to English customers using French. In the site configuration, the languages are listed as fr;en; and uses French as default. If I switch it to en;fr; English becomes the default. The problem is when a customer chooses a site language, the emails are sent in the opposite language. The emails are generated using HTML2PDF if it matters. I can’t seem to find where the language problem is. The language should stay the same throughout the users visit, even when sending email receipts and tickets.
Not sure what I should post for code since it eludes me…
Trying to follow the code up to when it sends emails out, but getting lost.
Aside from uploading the complete program, not sure what to do.
Suggestions?
I was thinking…
if the HTML2PDF program is converting the template, which is stored
in the database, why can’t I tell HTML2PDF which language to use
based on the $SITE=>lang or $SESSION=>lang ?
The template has language variables in it which are substituted for
the proper text when generated. Like {!englishtext!} and {!frenchtext!}.
These variables come from 2 language files, which are included when
the user chooses a site language.
Is there code I can place in the template to specify the correct language?
I think Smarty is used also, along with HTML2PDF.
The placeholder should be the same for both. HTML2PDF nor Smarty change the language, they just use what you put. Somewhere, you are saying to use different copy.