We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    Hi guys
    I'm setting up a Blog for a client (using Articles). Client's site has 3 contexts in 3 different languages and here's my problem on any non-english contexts:

    Archives:
    Dates of the month are by default Eng. How can I manually translate ?

    Date Published:
    Dates are in Eng format (Day, Month, Year). I'd need these to be Month, Date, Year

    Comments:
    Commenting function is in English etc

    Is there a way (built-in) to translate the blog or will I need to contract this out?
    How 'future proof' will my translated Blogs be if I upgrade Articles in the future

    Thanks







      ...
    • I set up different instances of Articles on each context and I had no problems with the language. I had an english and german version and the proper language was being used. Did you ever get it solved?
        Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
        • 36686
        • 165 Posts
        I have a multilanguage site where I've managed to get Articles to display the correct language by adding language files in core/components/articles/lexicon (awesome!). However, the one thing that isn't translated properly is the name of the months in the archive (March 2013 etc.). The English page displays the months in Swedish, which is my default context language. It should really display the months using the English context of course.

        Any ideas how to change the language of the month names ([[+date]]) displayed in the archive ([[+archives]])?
        • Sounds like there needs to be a way to switch the locale dynamically for the strftime and date functions. http://php.net/manual/en/function.setlocale.php
            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
            • 36686
            • 165 Posts
            I did a search for setlocale and found this thread which solves more or less the same issue:
            http://forums.modx.com/thread/79164/locale-and-multiple-contexts

            So, it seems to be a bug in Archives. Unfortunately I don't know how to make it work since my call is [[+archives]] since it's in my Articles template. I.e. I'm not calling the Archivist snippet with [[!Archivist]]. How would the below be applied to [[+archives]]...?

            [[!Archivist?  &locale=`es_ES.UTF-8`]]
              • 32507
              • 142 Posts
              Hi,

              I have same problem with sketchi. Any solution for this? setLocale is not working as descriped here:
              http://forums.modx.com/thread/71553/how-to-change-date-notification-to-other-local-language#dis-post-478992

              Where Articles get the day and month names?

                • 3749
                • 24,544 Posts
                I wonder if a snippet at the top of the page with something like this would do the trick:

                $modx->setOption('locale', 'es_ES.UTF-8'); 
                setLocale('LC_TIME', 'es_es');
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 32507
                  • 142 Posts
                  Hi,
                  I'm still struggling to change date/months to current language. (Articles/Archivist)

                  I've set 'locale' -setting for both context:
                  Fi Context: fi_FI.UTF-8 (Finnish)
                  Web Context: en-EN.UTF-8
                  Default system setting locale is blank.

                  I've also translated month names etc. to Lexicon Management > Core > Default > Fi
                  Tried everything in this thread and still don't get it working sad

                  Related to issue:
                  http://forums.modx.com/thread/?thread=71553&page=1
                  http://forums.modx.com/thread/79164/locale-and-multiple-contexts