• Resolved Metasequoia

    (@metasequoia)


    I have a comment about the way time values are handled in TEC. I am running a multilingual website in english and german. In german language “Uhr” is always added to the time, e.g. 12:45 Uhr. Would it be possible to add this function to the TEC plugin?
    I did it via css (.tribe-event-time::after {content: ” Uhr”;}), but this is then also added after the English times. So no ideal solution. Can you please assist me here? Thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Andras Guseo

    (@aguseo)

    Hi @metasequoia

    Thanks for reaching out!
    We don’t have anything in place in the code for this.

    Your CSS trick is a very good start though. By default the <html> tag of the site usually contains the language as well in this form:

    <html lang="de-DE">

    You can make use of that in CSS like this:

    :lang(de-DE) .tribe-event-time::after {
    	content: " Uhr";
    }

    So the CSS will only be applied on German pages, or, to be exact, on pages where the “lang” parameter is defined. As said WordPress should do that automatically.

    This is probably the easiest way to do it.
    Give it a try and let me know if that does the trick for you.

    Cheers,
    Andras

    Plugin Contributor Andras Guseo

    (@aguseo)

    One more note: depending on the version of German you are using the language code might be slightly different.

    You can check it by looking at the source of a German page with the browser inspector tool. Look for something like this:
    https://dl.dropbox.com/s/hnqweg4l91khtpb/shot_220115_110921.jpg

    A.

    Thread Starter Metasequoia

    (@metasequoia)

    Hi Andreas,
    thanks a lot for this! I already found this solution on my own ?? It works quite well! But it’s good to have it here now so if someone else needs this it can be found here.
    Thanks for the superb support!

    • This reply was modified 2 years, 10 months ago by Metasequoia.
    Plugin Contributor Andras Guseo

    (@aguseo)

    Awesome, happy to hear you managed to figure it out too! Congrats!

    If you need anything else please open a new thread and we’ll be happy to help.

    Cheers,
    Andras

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add german suffix “Uhr” to time values’ is closed to new replies.