• Resolved Ben

    (@benjaminloeffel)


    Dear Tijmen Smit,

    to begin with I would like to start by thanking you for creating such a great plugin.

    Currently, I am experiencing an issue with the translation of the opening hours text in the search results of my WordPress website. The website has the language set to German and I have installed the plugin WP Store Locator. I followed the official documentation to create a custom listing template. However, the values provided by <%= hours %> on line 26 are not being translated correctly in the search results.

    The files wp-store-locator-de_DE.po and wp-store-locator-de_DE.mo that are already present in the /wp-content/languages/plugins directory include the correct translation strings for the weekdays.

    Except for the opening hours, all other information is correctly translated in the search result.

    I would greatly appreciate it if you could help me resolve this issue, so that the opening hours are correctly displayed in German. Please let me know if you need any additional information or if there is anything else I need to do to help troubleshoot the issue.

    • This topic was modified 1 year, 10 months ago by Ben.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there Ben, this is Fernando on behalf of Tijmen, I hope that is ok ??

    The issue with the opening hours not being translated is generally related to the Store Locator transient cache. Please click the “Clear store locator transient cache” button in the settings page, near the end. That should fix things.

    But please get back to us otherwise.

    Regards,

    Thread Starter Ben

    (@benjaminloeffel)

    Hi Fernando, nice to hear from you! ??

    yes, I had tried that yesterday and again just now because I had read it in a different support post related to translation issues.

    I’m afraid the issue persists, and the data provided by the “hours” variable still appears in English instead of German.

    Interestingly but maybe unrelated, the function wpsl_get_weekdays() used in the custom listing template returns the weekdays in German.

    Hi again,

    Um, it is a bit weird. Maybe we could take a look at it if that is ok for you. If you could write us a ticket we could ask you for some more information that maybe you just don’t want to post here in public ??

    Let me know.

    Thread Starter Ben

    (@benjaminloeffel)

    Hi Fernando,

    I just wanted to let you know that I’ve submitted a ticket through the form provided in the link.

    Thank you for your help.

    Thread Starter Ben

    (@benjaminloeffel)

    Thank you, Fernando, for your competent and friendly support. I appreciate you taking the time and effort to help investigate the issue.

    To summarize for any potential readers who may be experiencing the same issue:

    The problem was resolved by adding the translation files wpsl-de_DE.po and wpsl-de_DE.mo to the directory /wp-content/languages/wp-store-locator, as described in the article on translations.

    In case the changes don’t immediately appear, like in my case, it’s helpful to temporarily disable the cache by activating debugging mode in the tools section of the plugin settings.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Opening hours in search result not being translated correctly’ is closed to new replies.