We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11149
    • 17 Posts
    Hello,

    used a Output Modifier to format a date in the following way:
    [[+publishedon:strtotime:date=`%b %d, %Y`]] -> Dec 20, 2011

    As I want to develop for the German language I was looking for a way to set the language for the 'Date' Output Modifier. ('Dec' should be 'Dez') I couldn't find any.
    I know you can edit it in php using the setlocale() function.

    My questions are:
    Is there a standard way to set this value right now?
    If not can you recommend any temporary solution?


    Greetings
    • In System Settings, in the Lexicon and Language area, is a setting for "locale". By default it is left empty, but you can set it to the correct locale.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 11149
        • 17 Posts
        Thanks for the fast reply.
        I tried setting it as in the php spec:

        • LC_ALL, 'de'
        • LC_TIME, 'de'
        • 'de'
        • 'de_DE'

        Nothing worked (yes, I cleared the cache).

        What are the right settings?
        • de_DE works for me.

          date=`%b %d, %Y`

          Dez 09, 2012
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 11149
            • 17 Posts
            Tried it again. Now it works. smiley

            Thanks for the big help!
              • 21800
              • 174 Posts
              hello out there

              is there also a possibility to do that for a restrikted area?
              For example: Ichanged the locale as above, but for rss to go right I need a RFC-822-conform date as
              <pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>.

              Something like [[+publishedon:strtotime:date=`%a, %d %b %Y %H:%M:%S %z`]] including locale info?