• Resolved Vladimir

    (@vladav)


    Hi, I have a Polylang multilangauge site, and I dont know how to solve “Closed” translation – e.g., when wekend days are set closed, for all languages is same translation 🙁

    Thank you for advise. Kind regards, Vladimir

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Noah Hearle

    (@designextreme)

    @vladav Thanks for pointing out this issue. There is no solution, unless you can set different Shortcodes in each of the page language versions.

    This is something I’ve noticed myself when using this on a multilanguage website (Dutch and English). I do want to resolve this, so I will look at a well-documented fix that’s easy for you and others to implement on their websites.

    I will create this functionality in a future release and tag you when it’s available.

    I had the same Issue on a german site. For now, I was able to fix that with a mini-plugin as a workaround:

    <?php
    /*
    Plugin Name: Anpassungen für "We're Open"
    Description: Ändert Text wie "closed" und "th" für die Übersetzungsprobleme in "We're Open".
    Version: 1.0
    */

    // Bearbeitet den HTML-Inhalt nach dem Rendering
    add_filter('wp_footer', function() {
    // Holt den gesamten HTML-Ausgang der Seite
    $html = ob_get_clean();

    // Ersetzt "th" etc im Datum durch "."
    $html = preg_replace('/(\d+)(st|nd|rd|th)(\s)/', '$1.', $html);

    // Ersetzt "closed" mit "geschlossen"
    $html = str_replace('Closed', 'geschlossen', $html);

    // Gibt den bearbeiteten Inhalt aus
    echo $html;
    }, 20); // höhere Priorität (späterer Filter)


    Plugin Author Noah Hearle

    (@designextreme)

    Thanks @thaberland, this is a little bit on the hacky-side, but it will get the job done until I’ve created this new functionality.

    I’ll try to get this sorted for the next release as it’s something I identified a while ago and will make multiple-language websites easier to set.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Closed translation / multilanguage’ is closed to new replies.