We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22668
    • 718 Posts
    Or I should create my own modifiers (like date) with setlocale in it?
    Or I’m ok with index?
      • 27347
      • 65 Posts
      I was wondering the same thing. I use setlocale for dates in a Dutch only site. Currently just in a snippet that i call first in my templates. It seems to work just fine but i’m wondering what would be the best strategy if i need a multi-lang site.
        • 21838
        • 284 Posts
        Think it should be written in a plugin (!) with OnHandleRequest parameter. Not in index.php. which in fact is overwritten in any updates.
          MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: smooth-graphics at Dec 21, 2010, 08:36 AM

          Think it should be written in a plugin (!) with OnHandleRequest parameter. Not in index.php. which in fact is overwritten in any updates.
          You could use the new OnInitCulture event actually, which is a good place to make any decisions regarding multi-language presentation and function.
            • 21838
            • 284 Posts
            Quote from: OpenGeek at Dec 21, 2010, 10:08 AM

            Quote from: smooth-graphics at Dec 21, 2010, 08:36 AM

            Think it should be written in a plugin (!) with OnHandleRequest parameter. Not in index.php. which in fact is overwritten in any updates.
            You could use the new OnInitCulture event actually, which is a good place to make any decisions regarding multi-language presentation and function.
            So can or should I even handle my switchContext gateway with that event?
              MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: smooth-graphics at Dec 21, 2010, 10:47 AM

              Quote from: OpenGeek at Dec 21, 2010, 10:08 AM

              Quote from: smooth-graphics at Dec 21, 2010, 08:36 AM

              Think it should be written in a plugin (!) with OnHandleRequest parameter. Not in index.php. which in fact is overwritten in any updates.
              You could use the new OnInitCulture event actually, which is a good place to make any decisions regarding multi-language presentation and function.
              So can or should I even handle my switchContext gateway with that event?
              I suppose if it makes sense at that point. Don’t see why not.