How can I translate emails using PHP language template?

Translate emails in ChronoForms v6 using PHP language templates.

Overview

The issue arises because the documented file path for language-specific email templates does not exist in a fresh CF v6 installation, and the correct placement for the PHP inclusion code is unclear.
Place the PHP code in the email body setup and adjust the file path to point to your custom language template files located in a directory you create, as the default component path is not used in v6.

Answered
ChronoForms v6
Ds Dsign 26 Feb, 2019
Answer
What is the right way to apply this solution section "Include language files" for CF v6?
<?php
$lang =& JFactory::getLanguage();
$tag =& $lang->getTag();
include (JPATH_SITE."/components/com_chronoforms/includes/{$form->form_details->name}/email_template.{$tag}.php");
?>
  1. That path doesn't exist on a CF v6 a fresh install... at least, not on mine.
  2. Where should i put the PHP code? (cause not working when putting it in the email body under setup / on submit / email)
  3. Can i use any path? (custom path: www.mudomain.com/SOMETHING_HERE/email_template.{$tag}.php)
  4. Can you guys update/add the infos on CF v6 FAQ for this specific question?
This topic is locked and no more replies can be posted.