"Site Interface" translations
Permalink Browser Info Environment
Hi,
Our client has translated 100's of items of text, but one of them is causing problems. We created an auto-responder email in /mail/contact_form_auto_responder.php with the following content;
These two items were then translated by the client into French, German, Spanish and Dutch.
For some reason, only the French one is working. The German, Spanish and Dutch ones appear in English.
I have checked everything and think this might be down to Cache - do you know where I can safely clear cache and have them rebuilt properly?
This is how I am calling it, in my code located at "/blocks/form/controller.php"
Kind Regards
James
Our client has translated 100's of items of text, but one of them is causing problems. We created an auto-responder email in /mail/contact_form_auto_responder.php with the following content;
These two items were then translated by the client into French, German, Spanish and Dutch.
For some reason, only the French one is working. The German, Spanish and Dutch ones appear in English.
I have checked everything and think this might be down to Cache - do you know where I can safely clear cache and have them rebuilt properly?
This is how I am calling it, in my code located at "/blocks/form/controller.php"
if(stristr($this->surveyName, "Contact Us")) { // auto responder $mh = Loader::helper('mail'); $mh->to($email); $mh->from(FORM_BLOCK_SENDER_EMAIL); $mh->load('contact_form_auto_responder'); @$mh->sendMail(); }
Kind Regards
James
Type: | Discussion |
---|---|
Status: | Resolved |
Thanks Antti
I just added this code, at the top of the action_submit_form() function;
And it fixed it!
Cheers
James
I just added this code, at the top of the action_submit_form() function;
$mh = Loader::helper('default_language', 'multilingual'); $mh->setupSiteInterfaceLocalization();
And it fixed it!
Cheers
James
Oh yeah, actually it does. Because the multilingual remembers the last section you've browsed, I didn't remember that!
Great that you got it solved, could you also please post to the other thread as well that you've experienced this issue?
Great that you got it solved, could you also please post to the other thread as well that you've experienced this issue?
Here's the link once again to the other thread if you missed it:
http://www.concrete5.org/marketplace/addons/internationalization/fo...
http://www.concrete5.org/marketplace/addons/internationalization/fo...
I think this came into the wrong add-on (as it's more Translations Manager specific) but doesn't matter as long as we have some reference point for this issue.
If the code that you posted below lies within the action_submit_form function, then it is in fact because of a known bug in concrete5.
There has been some in-depth conversation about this issue with the i18n community members and the core team here:
http://www.concrete5.org/marketplace/addons/internationalization/fo...
If you can also cast your "vote" to fix these issues in that thread, it would be extremely helpful to get these solved some day as the core team would realize that it's not just an issue with few i18n community members.
There is also one suggested solution to the tools/actions issue in that thread and it's this code:
In addition to that, you'll also need to tell the system which translations you want to load and this is where it gets awkward. You need to do few modifications:
1. In the form that you're submitting, you need to pass the current page CID in the form in order to know the correct language section in the processing code
2. Then in addition to the code posted above, you'll need to tell the system to set the current page to the one that you passed through your hidden field
This happens as follows (e.g. if you used targetCID as the field name):
Best,
Antti