Problem:
A CRED form that includes a repeating custom field has the "Add new" button. Client is not using WPML with String Translation and is using an alternative which is unable to translate that text.
Solution:
The string is registered with the wpv-views text domain.
This simple code snippet (added to the theme's functions.php file or using a plugin such as Code Snippets) can be used to translate the text:
add_filter( 'gettext', 'tssupp_custom_translate', 20, 3 ); /** * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext */ function tssupp_custom_translate( $translated_text, $text, $domain ) { if ( $text == 'Add new' && $domain = 'wpv-views' ){ $translated_text = "translation"; } return $translated_text; }
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 4 replies, has 2 voices.
Last updated by 6 years, 9 months ago.
Assisted by: Nigel.