Skip Navigation

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

Problem:
The client is unable to find and translate the word 'Speaker' from a PHP file in the plugin folder of their child theme, despite it appearing correctly on the front end in both languages.
Solution:
We recommend the following steps to make the string 'Speaker' translatable:
1. Navigate 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. Return 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 again to check if it's translated correctly.
Additionally, ensure that you are using the latest WPML plugins, which can be checked here.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by daniL 2 years, 6 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+02: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!