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

Last updated by mariaP-23 2 years, 4 months ago.

Assigned support staff: Bruno.

Author Posts
May 15, 2018 at 6:40 pm #2146290

mariaP-23

Of course I agree if you think this is the best procedure! Thank you!

May 15, 2018 at 6:43 pm #2146314

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Our compatibility team fixed the issue (as a workaround) by following the steps below:

- Open the file wp-content/themes/listingpro/include/timings.php
- Comment the lines 21 - 25. E.g.:

/*$lang = get_locale();
setlocale(LC_ALL, $lang.'.utf-8');
$day = strftime("%A");
$day = date_i18n( 'l', strtotime( '11/15-1976' ) );
$day = ucfirst($day);*/

-- Note the "/* ... */"
- Save the changes and upload the changed file

This should solve the problem. Please, could you test and verify if your site is working properly? After that, we'll contact the theme author so that he can implement these changes.

May 15, 2018 at 7:11 pm #2146433

mariaP-23

What do you mean saying comment the lines?
Replace them with what is inside /* ... */ ? I did exactly that but nothing changed!

May 15, 2018 at 8:51 pm #2147485

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

You need to add the comments around these lines. So, replace

$lang = get_locale();
setlocale(LC_ALL, $lang.'.utf-8');
$day = strftime("%A");
$day = date_i18n( 'l', strtotime( '11/15-1976' ) );
$day = ucfirst($day);

with

/*$lang = get_locale();
setlocale(LC_ALL, $lang.'.utf-8');
$day = strftime("%A");
$day = date_i18n( 'l', strtotime( '11/15-1976' ) );
$day = ucfirst($day);*/

See how the second example comments the codes out by using /*... */

If you need assistance with this, please add FTP access in the following reply, which I have marked as private.

May 15, 2018 at 9:22 pm #2147967

mariaP-23

As you can see in the screen capture the problem with 24 hour is solved but not in Greek and the days still are in English. Also in the search the problem exist!

May 16, 2018 at 12:35 am #2148798

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for sharing this screenshot for me so I can see where this is happening. I have forwarded this information to our 2nd tier developers so they can take another look. I will report back here when I have more information.

May 28, 2018 at 4:12 pm #2240560

mariaP-23

I am sorry do you have news related to my problem or did you forget about me?

May 28, 2018 at 8:37 pm #2241734

Bruno

Hello there,

I would like to take care of your ticket from now.

About the problem that was not fixed on the search/categories page, I fixed the problem. On the file wp-content/themes/listingpro/include/time-status.php, I followed the same steps and commented out the lines 25-29.

About the translation not being displayed, you will need to manually translate these strings. Please, click on the WPML > String Translation and, for example, search for "Today" or "24 hours open". Translate the strings to display on the front end. Please, note, these strings need to be translated manually. I'll attach two pictures for you to see.

Please, let me know if I can help with any other questions you may have. I'll be happy to help.

Thank you.

May 28, 2018 at 10:07 pm #2242120

mariaP-23

Yes now it works just fine. I did what you told me and everything is okey. The only thing now is the days that are in English in both languages. Is there a way that we can fix that?

May 29, 2018 at 1:36 pm #2246127

Bruno

Glad to know that this was fixed.

About the strings, please, click on the WPML > String Translation and translate again the weekdays. Note the strings that are highlighted in the image that I'm going to attach.

Note that these issues are happening because the "Listings Pro" theme is not fully compatible with WPML. Our team is aware of this and we are in contact with the author of the theme.

On the file /home/bruno/public_html/wp/wp-content/themes/listingpro/include/timings.php on line 657, I added this line:

$dayName = apply_filters( 'wpml_translate_single_string', $dayName, 'listingpro', 'listingpro-'.sanitize_title($dayName) );

Please, let me know if the workaround is working properly.

Thank you.

May 30, 2018 at 6:05 pm #2252858

mariaP-23

You are something else!!!!! I followed your instructions and now everything is okey! Thank you soooo much!
I have some other issues with the home page and especially the banner on the top of the home page. If you can see I wrote both languages in the search areas After explore Agios Nikolaos etc
Do you think that I have to open another ticket or you can solve that too?

May 30, 2018 at 6:07 pm #2252895

Bruno

Hi,

Glad to hear that it now works. 🙂

As the original issue is resolved may I kindly ask you please to open a new ticket for your new question? This will also help other users with similar problems find solutions when searching the forum.

Thank you.

June 4, 2018 at 9:15 am #2267433

mariaP-23

Thank you you are awesome!