Results 1 to 9 of 9

Thread: [solved]*Format hours in french ?

  1. #1
    User
    Join Date
    04-01-10.
    Posts
    289

    Default [solved]*Format hours in french ?

    Hi everyone,

    In french we write hours like that : 11h34 (h = heures). I'd like to format hours this way in Contao configuration but don't know how to do it.
    Thanks for help.
    Last edited by charled; 03/19/2016 at 22:09.

  2. #2
    New user cliffen's Avatar
    Join Date
    10-18-13.
    Location
    Lüneburg
    Posts
    22

    Default

    Hi,

    you could use this time format:
    Code:
    H\hi
    Explanation:

    - "H" returns the hours with leading zeros
    - "\h" return the "h" (The "\" escapes the letter)
    - "i" return the minuites

    Greeting, Cliff
    Extensions :: Github :: No support via PM.

  3. #3
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Hi Cliffen,

    Thanks for your answer. I did it but datepicker doesn't see the escape character (\) and so consider h as hour with no leading zero.

    Is there a way to bypass or deactivate datepicker ?
    Last edited by charled; 03/17/2016 at 16:26.

  4. #4
    New user cliffen's Avatar
    Join Date
    10-18-13.
    Location
    Lüneburg
    Posts
    22

    Default

    I think it would be better to distinguish between the configuration in the backend and the output in the frontend.

    I would suggest:

    - keep the default englisch format in the "system setitngs" ... this will be used in backend
    - define your custom time format in the page settings (see root page of your page tree) ... this will be used in frontend

    Regards, Cliff
    Extensions :: Github :: No support via PM.

  5. #5
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Just tried but doesn't work. And work no more in MetaModels.

  6. #6

  7. #7
    User
    Join Date
    04-01-10.
    Posts
    289

    Default

    Thanks spooky. I know it because I wrote it ;-) Charled and JLBA are the same person.

  8. #8
    User
    Join Date
    04-01-10.
    Posts
    289

    Default Siolved.

    Quote Originally Posted by cliffen View Post
    I think it would be better to distinguish between the configuration in the backend and the output in the frontend.

    I would suggest:

    - keep the default englisch format in the "system setitngs" ... this will be used in backend
    - define your custom time format in the page settings (see root page of your page tree) ... this will be used in frontend

    Regards, Cliff
    Finally, this works this way !! Perhaps do I have some problem with cache or anything else…
    Thanks.

  9. #9
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by charled View Post
    Thanks spooky. I know it because I wrote it ;-) Charled and JLBA are the same person.
    I know, I just posted it here for anyone else to know as well

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •