Resolved
Reported for: Contact Form 7 Multilingual 1.1.0
Resolved in: 1.2.1
Overview of the issue
The Contact Form 7 plugin allows you to set placeholders in your forms. However, if you are using WPML’s Translate Everything feature, you will find that they are not translated automatically.
This is a known limitation from our Advanced Translation Editor as explained in our documentation. You need to manually select your form placeholders and send them for translation.
Workaround
Please, make a full backup of your site before proceeding.
- Open wp-content/plugins/contact-form-7-multilingual/classes/Placeholders.php file.
- Look for line 40.
- Replace:
// $addEqualSignOnPlaceholder :: string -> string $addEqualSignOnPlaceholder = Str::replace( 'placeholder "', 'placeholder="' );
- With:
// $addEqualSignOnPlaceholder :: string -> string $addEqualSignOnPlaceholder = Str::replace( 'placeholder "', 'placeholder "' );
When adding an equal sign between the attribute name and its value, the placeholder doesn’t acting as it should anymore and becomes a “default value” which break the idea of a placeholder itself. Maybe I missed something but the solution provided doesn’t look good to me.
Hello there,
If the solution here provided does not work in your case, please open a ticket in our support forum where one of our specialists will be able to help you.
Regards