Skip Navigation

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

Problem:
The client is experiencing an issue where the accommodation pricing on their website is correctly displayed in English as "price for 2 nights" but incorrectly in Portuguese, showing "xx per night" even though the price is set for 2 nights. This issue occurs on both the accommodations page and the search availability results on the homepage.

Solution:
We recommend the following steps to resolve the issue:
1) Go to WPML > Theme and plugins localization.
2) Scroll down to the *Strings in the plugins* section.
3) Select the *Hotel Booking* plugin.
4) Click to scan for strings and wait until the process is complete.
5) Navigate to WPML > String Translation.
6) Search for the string "for %d nights" or "%d nights".
7) Translate the string into Portuguese, as the original string is in English.

Please ensure to clear all types of caches after performing these steps and check if the issue is resolved.

If the solution provided here is not relevant to your case, possibly because it's outdated or not applicable, we highly recommend opening a new support ticket. Before doing so, please check the related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, you can reach out to us on the WPML support forum.

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

Last updated by Bigul 1 year, 2 months ago.

Assisted by: Bigul.

Author Posts
January 31, 2024 at 12:52 am #15246919

joaoR-15

Tell us what you are trying to do?
In the accommodations (apartments) page, the price in the original site language (Portuguese) is saying "xx (price) per night" (in Portuguese "xx por noite") but the price is set to show for 2 nights. And, below it calculates the full price but still says "xx per night".

This only happens in Portuguese, in the translated language (English) all is fine, it says "price for 2 nights" above, and "price for x nights" after calculation, below.

Exactly the same is happening when using the search availability on the homepage. Results page have the same problem, again only in Portuguese.

The calculation is correct, but the terminology is not, which is very confusing.

I don't understand why this is happening. Why is the translation ok and the original language not?

I try to search the strings for this, but I can't find nothing.

Can you please help me with this? It's very confusing for my clients.

Thanks

What is the link to your site?
hidden link

January 31, 2024 at 9:31 am #15248167

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

We hope you have translated the strings from WPML>>String Translation Screen.

In some cases, it is possible that those strings have been recognized but not associated yet with the String Translation panel for the translation. Please visit WPML>>String Translation and click on the *Translate texts in admin screens »* link at the bottom of the page.

Then search for the missing strings in the *Admin Texts Translation* screen and check whether it is listed or not. If so, please add it for translation and translate it.

Pleas refer to this doc for more details and let us know your feedback - https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#strings-arent-selected-for-translation

--
Thanks!

Bigul

January 31, 2024 at 11:23 am #15248722

joaoR-15

Hi Bigul.

I couldnt find the strings on the admin screens and this does not seem to be the solution for my problem.

My question remains: Why is the translation string ok and the original language string not? And why cant I find none of them?

I'm using Motopress plugin with booklium theme and this was not happening before I instaled WPML plugin. So, Motopress support sent me to you to find and fix this problem.

As I told before, it's very confusing for users/clients because the full value of a reservation is presented as per 1 night. And also, the value for 2 nights (minimum stay set) is presented as per 1 night.

Thanks again

January 31, 2024 at 4:16 pm #15250341

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the details. This may be a compatibility issue. A couple of requests for tracking this.

1) Please let us know the exact steps to reproduce the bug on your staging site. It would be great if you could share a screencast for a better understanding. It will also help us in internal communication.

2) Please fill the private details fields after a full site backup{mandatory}. I would like to access the admin area of your site for further checking. Refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

February 1, 2024 at 12:01 pm #15254737

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the details and login information. This looks like a compatibility conflict and needs further testing.

So please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. So we can troubleshoot the bug without affecting your live site.

--
Thanks!

Bigul

February 1, 2024 at 12:15 pm #15254820

joaoR-15

Hi Bigul.

Do what you need please. And thanks for your help!

By the way, there’s one thing that may help: The site language is set to english on WP settings (which affect the theme I'm using - Motopress booklium) but the site language is set to Portuguese on WPML, which is the original language I used to build the site.

I forgot to include this information and don't know if this is important.

Best regards.

February 2, 2024 at 8:22 am #15258105

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the details and permission. I made a copy of the site. We will debug it further and get back to you soon. Please wait.

--
Thanks!

Bigul

February 4, 2024 at 10:02 am #15263191

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

I am getting the expected results on the local copy and your site after the following steps. Please check it after clearing all types of caches and let us know your feedback. Refer to the attached images for more details.

1) Visit WPML>>Theme and plugins localization
2) Scroll down to *Strings in the plugins* section
3) Select the *Hotel Booking* plugin
4) Scan for the strings, wait until the process complete
5) Visit WPML>>String Translation
6) Search for the string, *for %d nights* or *%d nights*
7) Translate it to Portuguese, because the string is in English

--
Thanks!

Bigul

2024-02-04_15h10_45.png
2024-02-04_15h10_18.png
2024-02-04_15h09_56.png
2024-02-04_15h09_26.png
2024-02-04_15h06_03.png