Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to retrieve the translated string from WPML >> String Translation page using the wpml_translate_single_string hook but it was returning the default language string instead of the translation.

Solution:
First, registering the string using the wpml_register_single_string hook solved the issue.

Relevant Documentation:
https://wpml.org/wpml-hook/wpml_register_single_string/
https://wpml.org/wpml-hook/wpml_translate_single_string/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by Thomas Henninger 1 year, 4 months ago.

Assisted by: Noman.

Author Posts
July 4, 2023 at 11:42 am #13940499

Thomas Henninger

Hello I am using this filter in functions php hook: apply_filters( 'wpml_translate_single_string', 'Partner - Konto wurde auf dentaleyepad.de angelegt', 'email-notify-string-new', $lang );

But it always just gets the String back and not the translated version of the string.

What am I doing wrong?