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

    I know this has been discussed, but I just cant figure it out. At the bottom of the blog it shows:
    Archives
    •April 2006

    Where or how do I change this to (I am using Spanish):
    Archivos
    •Abril 2006

    or

    •04-2006

    I have been reading about
    setlocale (LC_TIME, "es_ES");
    in other posts, but I dont know if I am placing that in the correct file, since there are various lang files. Does this go into the site lang, Ditto lang. or in another area? Also I saw this link: http://modxcms.com/forums/index.php/topic,3262.msg23226.html#msg23226 and created the Snippet, but couldnt figure out where to insert it.

    Anything to change that, please. Not being a programmer, I dont know where to go.
      • 6726
      • 7,075 Posts
      I tried to answer your last message by PM, but your box is full wink

      I’ll repeat what I told you in my first PM, you can indeed add setlocale at the top of the snippet you need localized (Ditto and Reflect work).
      I have come to do it a bit differently now, to make setlocale defined for each addons I have created a little setlocale snippet which only contains :

      <?php
      setlocale (LC_TIME, "fr_FR");
      ?>

      I add it before the DTD in my templates header and it does the trick smiley
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l&#39;outil id
        • 13137
        • 204 Posts
        Thank you for the help. It is very much appreciated.

        For the records, I also found WordsReplace 0.1.1 @ http://modxcms.com/forums/index.php/topic,3832.0.html
        This plugin does a wonderful job at replacing words that are hardcoded in ModX, things that havnt yet been moved over to the lang files.
          • 6726
          • 7,075 Posts
          Definetly a handy plugin but I’d rather have things properly localized, especially if you have more than two languages using word replacement is not the best course...

          Does the setlocale bit work for you ?
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 13137
            • 204 Posts
            Yes, that worked for me. Thanks.

            I think my problem was I was placing the setlocal in a chunk, as apposed to a snippet.

            Thanks for your assistance.

            (now if I could just get "Archives" to display in other languages? It appears to be temporaraly stored in assets/cache/siteCache.idx.php, but being pulled from the database, because if I change it, the next update to the site reverts it back.)
              • 6726
              • 7,075 Posts
              Indeed you can’t execute PHP code in chunks wink

              Gald it worked !
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id