We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36582
    • 463 Posts
    migxMultiLang looks like a good solution for a project I have coming up - a quick question though...

    I have the following domains: mysite.ch, mysite.eu, mysite.co.uk, mysite.com.

    I will be resolving all those domain names to mysite.com but wondered if it would be possible to configure mysite.ch to show say, the French language automatically - so it would go to something like mysite.com/fr/index.html ?
      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I have a question. Is there any way to use relative links to images and .css files and .js files? I'm trying to build a multi-language template package, and hard-coding absolute or full URLs isn't good for portability.
        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
        • 4172
        • 5,888 Posts
        There may be ways, but not with other issues, I think.

        If we do not add the lang en/ de/ to the base-url, we would need to make sure, all the page-links would be generated with the lang-prefix.

        Or, may be, some rewrite-rules could solve it.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ok. I'll just have to clearly document the need to hard-code the base href tag.

          Another problem. I'm using getImageList, and in my MIGx form I have fields like "title_en", "title_de", "title_fr". The getImageList tpl looks like this:
          <img src="[[+image:phpthumbof=`w=300&h=300&zc=1`]]" alt="[[+title_[[++cultureKey]]]]">

          The problem is that the title is getting cached at some point. I've tried [[+mml_cultureKey]] as well, in various ways of cached or uncached.

          [solved] - I hard-uncached the getImageList snippet [![!getImageList...]]
            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
            • 4172
            • 5,888 Posts
            Here:
            http://www.webcmsolutions.de/de/modx-extras/migxcalendars/customizing-the-backend-manager.html

            Each Block is a MIGX-Item (just began to translate)

            I have it like that:
            [[!+migx_content_[[++cultureKey]]:default=`[[!+migx_content_de]]`:textile]]


            If you hard-uncache, nothing would be cached.
            If you have usual uncached tags for everything, it is not cached by MODX, but by mmlCache for each language.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I'm also having a serious problem getting any of the phpthumb snippets to work. I can get by with manually re-sizing my images before I upload them, but it should be possible to use one of these in the getImageList tpl.
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Ok, got pthumb working. The getImageList is called
                [![!getImageList? &tvname=`album` &tpl=`albumTpl`]]

                And the albumTpl looks like this:
                <img src="[[+image:pthumb=`&w=100&h=100`]]" alt="[[+title_[[++cultureKey]]]]">

                I'm using a JQuery slider plugin that uses the alt attribute for its caption.
                http://jquery.malsup.com/cycle2/
                  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
                  • 4172
                  • 5,888 Posts
                  Hmm...

                  I have it like that and this is working for me:

                  [[!getImageList? &tvname=`contents` &tpl=`@FIELD:content_type`]]


                  <img src="[[!+image:phpthumbof=`w=200`]]" />
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    I have to call the getImageList absolutely uncached because of the cultureKey.
                      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
                      • 4172
                      • 5,888 Posts
                      No, you don't. This working too, for me, with the normal uncached-call:

                      [[!+migx_content_[[++cultureKey]]:default=`[[!+migx_content_de]]`:textile]]


                      migx_conten_de and migx_content_en are also MIGX-fields

                      hard-uncached is only needed for stuff, which would be uncached, normally, like
                      Formit-calls, for example.
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!