Hi, I’m trying set the locale on checkout and thank-you page. I managed to get everything working properly, except the transaction details and payment details on the thank you page are not translated correctly. Probably because this content is loaded over AJAX. I’m trying the code below, but the content is still loaded in the main site language, which is nl_NL. It’s very strange cause when I var_dump( get_locale() ), I do get en_US as return.
Also when trying the following code on a different (static) page, the content is displayed in the correct language (en_US). This shows the problem lies within the AJAX request.
Ajax requests are considered to be admin requests so using var_dump( get_locale() ) on the front end, is not and admin request and may return something different to doing the same on an ajax request.
What are you using to set up multiple languages on the site?
Ultimately this is an issue with how translations are handled by WP and WPML on Ajax requests so the above may not actually fix the problem.
Viewing 3 reply threads
The support post ‘Change locale in AHEE_ thank_you_page transaction_details_template_ after_headin’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.