Where can we see the website in question?
Thread Starter
M. NASRI
(@mohammednasri)
See Editing form template
What content do you have in the Form tab panel?
Thread Starter
M. NASRI
(@mohammednasri)
Here is what I have :
<div class="row">
<div class="col-md-12">[select* programmechoisi class:form-select class:form-control first_as_label data:parcours]
</div>
</div>
OK. So, what did you want to do with the data:parcours option?
Thread Starter
M. NASRI
(@mohammednasri)
add_filter('wpcf7_form_tag_data_option', function($data, $options, $args) {
$data = [];
foreach ($options as $option) {
if ($option === 'parcours') {
$data = [];
$data[] = __("Programme choisi", "cutheme");
$data = get_parcours_with_programmes($data);
}
The line : __(“Programme choisi”, “cutheme”); is not getting the translated text when I move to the new version of CF7. It is currently working well, my form shows ‘Selected programs’. But as soon as I update the plugin, the same form shows : ‘Programme choisi’.
The translation domain is cutheme. It has nothing to do with Contact Form 7.
Thread Starter
M. NASRI
(@mohammednasri)
This is not the question. Yes, the translation domain is indeed cutheme and the translations are well defined. But the function __() is not working here, my question is WHY. It is working well here https://collegeuniversel.ca/en/studying-in-montreal/ where I use CF7 version 5.6.4.
The same project (in dev mode) is hosted here : http://cu.dev.xweb.ma/en/studying-in-montreal/ with CF7 version 5.7.2.
You will notice from the latest page that both the dynamic selects are not translated; the countries and the selected programs.
The only different thing between the two project is the version of CF7. When I update CF7 to the current version (5.7.2), the dynamic selects show options in the original default language (French in my case), as though the WP function __() is not working.
I hope that it is now clearer.