Skip Navigation

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

Problem:
The client was unable to locate the string "Manage booking" for translation in their theme named "Renta Camper Van". The PHP code provided by the developer was suspected to be incorrect, as it used the wrong text domain and incorrect quotation marks.

Solution:
We advised the client to ensure that the correct text domain is used in the PHP code. The correct code should look like this:

<?php echo __( 'Manage booking', 'renta-camper-van' ); ?>

We recommended following the steps in our article on translating the theme you created, which includes rescanning the theme for strings.

Additionally, we suggested enabling the option "Look for strings while pages are rendered" by:
1. Going to WPML → String Translation.
2. Enabling the option "Look for strings while pages are rendered".
3. Navigating to the page where the untranslated strings are displayed.
4. Returning to WPML → String Translation to check if the string has been registered.
5. Translating the string if it has been found.

For more information, the client can refer to our documentation on finding strings that don't appear on the String Translation page.

If the solution provided here is outdated or not applicable to your case, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, 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.

This topic contains 1 reply, has 2 voices.

Last updated by Andrey 9 months, 1 week ago.

Assisted by: Andrey.

Author Posts
April 26, 2024 at 9:49 am #15569789

eamonnT

I have completed the followingsteps but still can not locate the string "Manage booking" So that I can translate it, please see screen1 image attached for the field in question and url
hidden link

I have ran the option see screen2
But I can not locate the string see screen 3

The developer has added the php code for translation see manage boking png

Can u check please maybe the php code is incorrect?

I am also translated the string "special offers" see screen4 nut that only shows correctly for Spanish translations

screen4.png
manage booking.png
screen3.png
screen2.png
screen1.png
April 26, 2024 at 10:18 am #15570051

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for contacting WPML support.

Your theme is named "Renta Camper Van," but your code uses the text domain as 'twenty-ten'. Developer or you need to be sure that the correct text domain is being used in the code. Additionally, I see double quotes instead of single ones. Example:

<?php echo __( 'Manage booking', 'twentyten' ); ?>

Please follow this article: https://wpml.org/documentation/support/translating-the-theme-you-created/

Then, you need to re-scan your theme again or use the following method:

1. Go to WPML → String Translation.
2. Enable the option "Look for strings while pages are rendered".
3. Navigate to the page where untranslated strings are displayed.
4. Return to WPML >> String Translation and verify if the given string has been registered.
5. Translate the string.

https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/