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 2 voices.

Last updated by Mihai Apetrei 8 months, 2 weeks ago.

Assigned support staff: Mihai Apetrei.

Author Posts
September 15, 2019 at 12:22 pm #4574605


Tell us what you are trying to do?

I am trying to translate this string into Greek. Hey, be careful you are updating this AD.

Is there any documentation that you are following?

Is there a similar example that we can see?

In the options-init.php file we have the following code

'title' => esc_html__( 'Update Ad Notice', 'carspot' ),
'default' => 'Hey, be careful you are updating this AD.',

In the string translation i can only translate Update Ad Notice string but no the default Value.
What is the link to your site?

hidden link

September 16, 2019 at 6:58 am #4576657

Mihai Apetrei

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for contacting WPML Support!

I will be happy to help you with this.

You should add the same "esc_html__" function to the second phrase.

Instead of:

'default' => 'Hey, be careful you are updating this AD.',

you should use

'default' => esc_html__( 'Hey, be careful you are updating this AD.', 'carspot' ),

After doing this in the code, please go to WPML > Theme and localization > and re-scan the theme or plugin that adds this strings.

After that, you should be able to find the new string inside WPML > String Translation.

Please let me know how that goes.

Kind regards,
Mihai Apetrei