Skip Navigation

[Gelöst] Translation not done with last plugin version

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 4 Jahren, 9 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 5 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Pat vor 4 Jahren, 3 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#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!