Skip Navigation

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 3 replies, has 2 voices.

Last updated by daniL 1 year, 11 months ago.

Assisted by: Osama Mersal.

Author Posts
May 25, 2022 at 11:37 am #11304037

daniL

Hi!
I am trying to add a new string for being translatable to the site`s 2 languages.

I have a php file in the plugin folder in my child theme folder.

<?php if( get_field('ponente_evento') ): ?> <dt class="tribe-events-start-date-label"> <?php esc_html_e( 'Speaker:', 'the-events-calendar' ); ?> <br><?php the_field('ponente_evento'); ?> </dt><?php endif;?>

It is working fine on site both languages, the word Speaker appears on the front. But I am not able to find and translate Speaker on the backend, on the WPML string translation area.

I want the word "Speaker" to be added to the 'the-events-calendar' domain so I can translate.

Can you add some light to this?

Thanks in advance,

Dani

May 25, 2022 at 12:34 pm #11304829

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

1) Could you please try the following steps?

1- Go to WPML-> String Translation
2- Enable the "Look for strings while pages are rendered" option
3- Visit the front end where this string is shown
4- Back to WPML-> String Translation
5- Search for the string
6- Translate it
7- Disable the "Look for strings while pages are rendered" option
8- Visit the front end where this string is shown to check if it's translated correctly

2) Please make sure that you use the latest WPML plugins. You can check them here. (https://wpml.org/account/downloads/)

I hope this helps you. If you need further info, please let me know.

Best regards,
Osama

May 25, 2022 at 12:47 pm #11305057

daniL

Hi Osama,

First of all, thanks for the quick response!

Follow your steps, but the string search did no find the "Speaker" string in any domain.

Am I declaring the new string (Speaker) correctly this way "<?php esc_html_e( 'Speaker:', 'the-events-calendar' ); ?>" ?

Thanks again!

May 25, 2022 at 12:51 pm #11305065

daniL

Sorry Osama, try again your steps and everything was perfect. Thanks a lot!

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