On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • pierrot1010 Reply #1, 1 year ago
    Hello

    I created a MODx website in two language, english and french with babel.
    I also installed and configured QUIP in order to have a secton where visitors can leave meassages.
    https://docs.modx.com/extras/revo/quip

    The problem, QUIP display the text (as the form or the date) in english and of course, I would like to have it in french when the visitors visit the french pages.

    Is there a way to have the QUIP pages according to the selected context (the language of the pages)?

    Many thank for your support
    Cheers
    • This is weird. Quip doesn't appear to have a language property, yet it has seven language files, including French. None of the lexicon->load() calls specify a language.

      The lexicon uses the manager_language System Setting value when operating in the Manager and the cultureKey System Setting when operating in the front end.

      If you create those two as Context Settings for each context, Quip may deliver the correct language for you. Let me know if it works. You'll have to clear the cache files (maybe manually) for it to take effect. You can use the CacheClear extra to clear the cache files quickly and easily.
        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
      • pierrot1010 Reply #3, 1 year ago
        Quote from: BobRay at Oct 29, 2018, 10:28 PM
        This is weird. Quip doesn't appear to have a language property, yet it has seven language files, including French. None of the lexicon->load() calls specify a language.

        The lexicon uses the manager_language System Setting value when operating in the Manager and the cultureKey System Setting when operating in the front end.

        If you create those two as Context Settings for each context, Quip may deliver the correct language for you. Let me know if it works. You'll have to clear the cache files (maybe manually) for it to take effect. You can use the CacheClear extra to clear the cache files quickly and easily.

        Dear Bobray,
        Thank again for your reply, but I did not understand everything sad.
        You asked me to create a new context seting. But when I create one for web context, I did not understand which option, I have to select for
        key
        field type
        namespace
        name

        As I confgiure Babel, for my web context, I already those
        Base URL base_url /
        Culture key cultureKey fr
        Site start site_start 1


        This what you asked me to check? I am a bit confused.

        • pierrot1010 Reply #4, 1 year ago
          Quote from: pierrot1010 at Oct 29, 2018, 10:45 PM
          Quote from: BobRay at Oct 29, 2018, 10:28 PM
          This is weird. Quip doesn't appear to have a language property, yet it has seven language files, including French. None of the lexicon->load() calls specify a language.

          The lexicon uses the manager_language System Setting value when operating in the Manager and the cultureKey System Setting when operating in the front end.

          If you create those two as Context Settings for each context, Quip may deliver the correct language for you. Let me know if it works. You'll have to clear the cache files (maybe manually) for it to take effect. You can use the CacheClear extra to clear the cache files quickly and easily.

          Dear Bobray,
          Thank again for your reply, but I did not understand everything sad.
          You asked me to create a new context seting. But when I create one for web context, I did not understand which option, I have to select for
          key
          field type
          namespace
          name

          As I confgiure Babel, for my web context, I already those
          Base URL base_url /
          Culture key cultureKey fr
          Site start site_start 1


          This what you asked me to check? I am a bit confused.

          When i look at the snipest QuipLatestComments, I can see this line:
          $quip->initialize($modx->context->get('key'))

          Would it be an idea to change to
          $quip->initialize($modx->context->get('cultureKey'))
          • pierrot1010 Reply #5, 1 year ago
            Quote from: pierrot1010 at Oct 29, 2018, 10:52 PM
            Quote from: pierrot1010 at Oct 29, 2018, 10:45 PM
            Quote from: BobRay at Oct 29, 2018, 10:28 PM
            This is weird. Quip doesn't appear to have a language property, yet it has seven language files, including French. None of the lexicon->load() calls specify a language.

            The lexicon uses the manager_language System Setting value when operating in the Manager and the cultureKey System Setting when operating in the front end.

            If you create those two as Context Settings for each context, Quip may deliver the correct language for you. Let me know if it works. You'll have to clear the cache files (maybe manually) for it to take effect. You can use the CacheClear extra to clear the cache files quickly and easily.

            Dear Bobray,
            Thank again for your reply, but I did not understand everything sad.
            You asked me to create a new context seting. But when I create one for web context, I did not understand which option, I have to select for
            key
            field type
            namespace
            name

            As I confgiure Babel, for my web context, I already those
            Base URL base_url /
            Culture key cultureKey fr
            Site start site_start 1


            This what you asked me to check? I am a bit confused.

            When i look at the snipest QuipLatestComments, I can see this line:
            $quip->initialize($modx->context->get('key'))

            Would it be an idea to change to
            $quip->initialize($modx->context->get('cultureKey'))

            OK, I belived, I solved my problem.
            I have a web site with two language: French and english.
            The default language is french.
            In context the key of french version (default) is : web
            In context the key of english version is: en.

            I went to
            /core/componment/quip/lexicon/
            and I duplicated the 'fr' folder and named it to web.
            I uploaded the /core/componment/quip/lexicon/web/ folder and it's wokrs

            Morever, when I go to Settings->Lexicons, for the quip namespace, I can see 'web' on the language field.
            • Hi maybe I can help a bit here.

              I think BobRay is saying is that you have your two contexts, EN and FR, right? You create settings for those two contexts that mirror the system setting values.

              Then the value will be passed to Quip properly. Its going to your main system settings for language option, I guess because Quip doesn't specify. But it does get the context.

              Make sense? Let's hold off on modifying the Quip code for now, its not a permanent solution.

              manager_language System Setting value when operating in the Manager and the cultureKey System Setting
              • pierrot1010 Reply #7, 1 year ago
                Dear nuan88, thank for participating.
                That's right I have two context, but the name are 'web' and 'en'.
                My solution is not good?

                OK, I belived, I solved my problem.
                I have a web site with two language: French and english.
                The default language is french.
                In context the key of french version (default) is : web
                In context the key of english version is: en.

                I went to
                /core/componment/quip/lexicon/
                and I duplicated the 'fr' folder and named it to web.
                I uploaded the /core/componment/quip/lexicon/web/ folder and it's wokrs

                Morever, when I go to Settings->Lexicons, for the quip namespace, I can see 'web' on the language field.
                • Well, if it works roll with it lol! I didn't see your solution.

                  Generally there is some risk in hacking extras, because when an update comes in, it could break the fix so to speak.

                  Actually I like your solution a lot, its pretty smooth to be honest. The call was to the web context so you just made a new lexicon called web.

                  • I agree. I suspect that you were supposed to name all contexts with the two-letter language code. Your solution is very clever. I'm not sure mine would have worked since Babel may be controlling those settings and using 'web' for one of them.

                    You'll have to re-do it if you ever update Quip, but since Quip hasn't been updated since 2012, I think you're on pretty safe ground. wink
                      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