Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1494590

    Hi,

    I am creating a multi-language website with different domains. Depending on the language (and the country the website is built for), a countdown should have different dates. How can I achieve this, since the date of the animated countdown cannot be set using string translations? I would like to avoid using the WordPress editor for different languages (every website has the same layout).

    Thank you in advance!

    #1494593

    do you think of that perhaps?
    https://enfold.webers-webdesign.de/3-columns/

    #1494595

    This is about the translation of “hours”, “minutes”, etc, correct? I need to set different dates (e. g. countdown to 2027-01-01 for German and countdown to 2027-04-01 for the English version).

    #1494614

    Hi,

    Thank you for the inquiry.

    Since the countdown date itself cannot be translated via string translations, the recommended approach is to add multiple Countdown elements (one per language). You can then control the visibility of each countdown with custom css depending on the active language.

    Add a separate Countdown element for each language and assign custom css class names, for example:

    av-custom-lang-countdown av-custom-lang-countdown-en <-- for EN
    av-custom-lang-countdown av-custom-lang-countdown-de  <-- for DE
    

    Set all countdowns to be hidden by default:

    .av-custom-lang-countdown {
      display: none;
    }

    Then only show the correct countdown based on the active language:

    html[lang="en-US"] .av-custom-lang-countdown-en {
      display: block;
    }
    
    html[lang="de-DE"] .av-custom-lang-countdown-de {
      display: block;
    }

    Best regards,
    Ismael

    #1494621

    @Ismael Thank you, perfect workaround!

    #1494628

    Hi,

    Great, I’m glad that Ismael could help you out. We’ll close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Animated Countdown with different dates per language (WPML)’ is closed to new replies.