Skip Navigation

[Résolu] Translation not done with last plugin version

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

The “UPLOAD OR SELECT IMAGE” text shown in a Form to clear an image does not seem to be translatable.

Solution:

You can translate the text with WordPress filter hook "gettext", for example:

https://toolset.com/forums/topic/translation-not-done-with-last-plugin-version/#post-1489657

Relevant Documentation:

https://developer.wordpress.org/reference/hooks/gettext/

This support ticket is created Il y a 4 années et 1 mois. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 réponses, has 2 voix.

Last updated by Pat Il y a 3 années et 7 mois.

Assisted by: Luo Yang.

Auteur
Publications
#1489329

Pat

Hello,

I just discover that some FR translations are not working well.
I have for example the following classes :
js-toolset-media-field-trigger (when you have an image field inside a Form)
where the text is : UPLOAD OR SELECT IMAGE
Regards
Pat

#1489657

Hello,

I assume we are talking about a post form with option "Use the WordPress Media Library manager for image, video, audio, or file fields " enabled.

You can translate the text with WordPress filter hook "gettext", for example:

add_filter('gettext', function($translation, $text, $domain){
	if($text == 'Upload or select image' && $domain == 'wp-cred'){
		$translation = 'My text here ...';
	}
	return $translation;
}, 10, 3);

More help:
https://developer.wordpress.org/reference/hooks/gettext/

#1489733

Pat

Hi Luo,

Thanks, this is working fine now.
I was thinking this kind of translation was done within the Toolset plugin?
Was I wrong?
Regards
Pat

#1489769

No, this translation is not done yet, since option "Use the WordPress Media Library manager..." was added recently.

And I have escalated this thread, hope our translator will be able to work on it soon.

#1586113

Herer is a quick update for you. It looks like the translation files have not yet been updated in the latest releases, and our developers have not provided an ETA for adding them.

#1725019

Pat

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.