qTranslate-X and filter hooks
-
I am using qTranslate-X with the Offers for WooCommerce plugin. I am trying to use filter hooks to set the language text. Here is an example of a code snippet in the functions.php:
`function custom_donatation_amount( $text ) {
$text = ‘[:en]English text[:nl]Dutch text[:]’;
return $text;
}
add_filter( ‘aeofwc-offer-form-label-price-each’, ‘custom_donatation_amount’ );The result is that it outputs as it was input.
I have also tried the following methods:
[:en]English text[:][:nl]Dutch text[:]
Result: outputs as it was input.[:en]English Text[:][:nl] Dutch text [:]
Result: outputs as “[:en]English text[:][:nl]Dutch text[:]”<!--:en-->English text<!--:--><!--:nl-->Dutch text<!--:-->
Result: outputs as “English TextDutch text”I have also tried escaping the brackets with the backslash (\) in the $text variable.
Anyone have any idea’s?
- The topic ‘qTranslate-X and filter hooks’ is closed to new replies.