How to translate widget custom titles using WPML?

Posted in: Newspaper
Post count: 5

The explanation in post https://forum.tagdiv.com/topic/translation/#post-2491 doesn’t quite apply.
Any ideas? Thanks

Post count: 5

Until we get a reply, I have added the following code to the get_block_title and get_block_title_raw methods, in td_block.php:

if (!empty($custom_title)) {
     $custom_title = translate($custom_title, 'newspaper');
 }

Would this be something you could include in a later version?
Thanks,

Post count: 3343

Hi,
Thanks for the suggestion! I will ad this on our todo list for future updates.

Thanks again!

Post count: 5

Hey Marius, any news about this? Seems it’s still not ok – can’t translate side widget custom titles (ex. the social icons widget).

Post count: 6600
Post count: 5

Hey, it doesn’t really help, as the second link is actually meant for theme developers.
I have a fix, the one provided in the second comment. Having that placed wherever $custom_title is used, in td_block.php does the trick for the custom block titles.
It’s just I need to put these in each time the theme is updated, which is not very cool.

Post count: 1291

Hi,

For the moment we don’t plan to integrate wpml 100%, because of this we can’t integrate only a small modification like the one presented on your second comment. I don’t own a version of wpml so i cannot say what that function may do. To integrate something like that in the theme we need to add an extra condition so that it applies only when wpml is installed and active, this way it won’t affect the usability for users which are not using wpml.

Thank you, Emil G.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.