We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33992 ☆ A M B ☆
    • 455 Posts
    Quote from: pedmajungne at Feb 14, 2009, 04:33 AM

    Example of Product table:
    --------------------------------------------------------------------
    | Product_Id | Product_Desc_en | Product_Desc_de | Product_Desc_it |
    --------------------------------------------------------------------
    | 1 | Some English desc | Some German desc | Some Italian desc |
    | 2 | .....
    Hi,
    This is a DB table, yeah? So how do you get data from this table? by a snippet? if your answer is YES, so create a parameter for choosing language and use [% %] tags as value of this parameter like this:
    [[yourSnippet? &lang=`[%LANG%]` ....]]

    The &lang should use table column by changing language....
    See the Ditto call example in the first post.
      God loves me. 【ツ】


      MODX.ir (Persian Support)

      Boplo.ir/modx/ (Persian)
      • 16545
      • 358 Posts
      As I see it is not possible to use cached pages any more. For some large sites it won’t get a great optimization goal.
        • 22958
        • 50 Posts
        Hi AHHP & Lobasus,

        @AHHP :
        -----
        Hi,
        This is a DB table, yeah? So how do you get data from this table? by a snippet? if your answer is YES, so create a parameter for choosing language and use [% %] tags as value of this parameter like this:
        Code:

        [[yourSnippet? &lang=`[%LANG%]` ....]]

        The &lang should use table column by changing language....
        See the Ditto call example in the first post.
        -----

        Thanks for your reply.
        Yes, it use MySQL. The old data is NOT using Modx (just normal PHP using cookies, send the content depend on the language he choosed). So it’s not using snippet. So, do you mean via Snippet we can do that ? This is what I want to know (sorry, I’m new in Modx). I read somewhere at Forum, we need something like Module for BackEnd & Snippets for FrontEnd to display it (if we want to using this old data with its table unchanged). TobyL gave me a Tip, that it can be done via Snippets (please see : http://modxcms.com/forums/index.php/topic,32782.0.html) . I think, to use this plugin, we must ’convert’ the old content to Modx (if we don’t want to type it one by one at the plugin ... smiley ... because I have already so many contents in it with some languages .... ) O.K, I will read througout your first post again ... Many Thanks. Nice plugin AHHP ... smiley

        Another question :
        The Modx content is stored in (Modx_prefix)site_content table. So, if using this Plugin, where will the translated content be stored ? Also in the same table (with extra field in the table) ?

        @Labasus :

        ------
        This question is off topic, better create new one for this task or just outsource some guru to do that.
        Last stuff will not takes lot of time:)

        As I see it is not possible to use cached pages any more. For some large sites it won’t get a great optimization goal.
        ------

        Thanks also for your reply.
        If I try to create new one, what must I do ? Create Module, plugin or Snippets ?
        Outsource some guru, which one, how much approximately ?
        About cache, this plugin need that the cacheable option to be turn off. But can you explain, why is it not worth to use in large site ?

        Many Thanks ...
        Best Regards,
        - pedma -
          • 16545
          • 358 Posts
          1) There are some useful solutions for content migration:
          http://modxcms.com/forums/index.php/topic,15347.0.html
          http://modxcms.com/forums/index.php/topic,29616.msg180038.html#msg180038

          Other way : http://modxcms.com/forums/index.php/board,224.0.html
          2) If you do not use page cache feature for some mega page/tv sites it degrees 10-20% Web server performance (we talk about more than 1000 documents).

          Quote from: pedmajungne at Feb 14, 2009, 07:49 PM

          @Labasus :

          Thanks also for your reply.
          If I try to create new one, what must I do ? Create Module, plugin or Snippets ?
          Outsource some guru, which one, how much approximately ?
          About cache, this plugin need that the cacheable option to be turn off. But can you explain, why is it not worth to use in large site ?

          Many Thanks ...
          Best Regards,
          - pedma -
            • 16545
            • 358 Posts
            @AHHAP: Have you tried to use this plugin with Wayfinder menu builder?

            I think some problems are with these build-in placeholders:
            [+wf.classes+] - where classes specifed will be inserted (includes class=" ")
            [+wf.classnames+] - outputs the just the class names (without class=" ")
            [+wf.link+] - the href value for your link
            [+wf.title+] - text for the link title
            [+wf.linktext+] - text for the link display
            [+wf.wrapper+] - where to insert a submenu
            [+wf.id+] - where to insert unique id
            [+wf.attributes+] - where to insert link attributes
            [+wf.docid+] - the document identifier for the current item
            [+wf.subitemcount+] - displays the number of items in a folder
            [+wf.description+] - output the description field
            [+wf.introtext+] - output the introtext field
              • 33992 ☆ A M B ☆
              • 455 Posts
              Quote from: pedmajungne at Feb 14, 2009, 07:49 PM

              Yes, it use MySQL. The old data is NOT using Modx (just normal PHP using cookies, send the content depend on the language he choosed). So it’s not using snippet. So, do you mean via Snippet we can do that ? This is what I want to know (sorry, I’m new in Modx).
              Hi Pedma,
              Snippet is a php script that returns output to MODx pages instead it’s tag( [[ ]] and [! !]) so you can almost use any php codes as snippet. save your codes (for getting data from your tables) as a snippet. snippet parameter is like a variable which gets value in top of the snippet codes for example:
              [[yourSnippet? &param1=`something`]]

              Now you can use $param1 in your codes and etc (please read more in links in topic you said) for language choosing set a parameter to get language( &paramName=`[%LANG%] ), this plugin sets value to it.

              Quote from: pedmajungne at Feb 14, 2009, 07:49 PM

              I think, to use this plugin, we must ’convert’ the old content to Modx (if we don’t want to type it one by one at the plugin ... smiley ... because I have already so many contents in it with some languages .... )
              Snippets are php codes you can get any data from any table and any database you need. NOT only MODx DB. simply connect to your database and get or set data.
              You can even use MODx DB APIs, see this: DBAPI struggle where some one wants to connect to another DB by MODx APIs.

              Quote from: pedmajungne at Feb 14, 2009, 07:49 PM

              Another question :
              The Modx content is stored in (Modx_prefix)site_content table. So, if using this Plugin, where will the translated content be stored ? Also in the same table (with extra field in the table) ?
              MODx stores site data in many tables, site_content is for documents data, chunks are in site_htmlsnippets, template variables stores in a specified table and etc.
              When you put {{[%LANGUAGE%]_chunk}} in your page, plugin set value for [%LANGUAGE%] and change the chunk tag to (e.g.) {{french_chunk}}, you have to have created this chunk and MODx will print value of this chunk from site_htmlsnipets (or cache).


              Quote from: labasus at Feb 15, 2009, 04:50 AM

              @AHHAP: Have you tried to use this plugin with Wayfinder menu builder?
              I think some problems are with these build-in placeholders
              Wayfinder use chunks as tpls and EasyLingual does not convert [% %] tags in chunks.

                God loves me. 【ツ】


                MODX.ir (Persian Support)

                Boplo.ir/modx/ (Persian)
                • 16545
                • 358 Posts
                If Wayfinder isnot used, what the other alternative could be used for menu generation and so powerful as Wayfinder is?
                huh
                  • 20413
                  • 2,877 Posts
                  @labasus: I still havent used this plugin, but is it possible to
                  generate a [*[%lang%]wayfinder*] tv and then manually create wf tpl’s for each language/wayfinder...?

                  //if the snippet call can’t go from tv then @chunk would do it or just use {{[%lang%]wayfinder}} smiley

                  Hmm...
                  [+wf.title+] - text for the link title
                  [+wf.linktext+] - text for the link display

                  I dunno...


                  Well... This plugin doesn’t change the field title and alias anyway!!!!
                    @hawproductions | http://mrhaw.com/

                    Infograph: MODX Advanced Install in 7 steps:
                    http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                    Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                    http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                    • 16545
                    • 358 Posts
                    This is only a theory, but how it will be in the practice.

                    Quote from: mrhaw at Feb 15, 2009, 03:03 PM

                    @labasus: I still havent used this plugin, but is it possible to
                    generate a [*[%lang%]wayfinder*] tv and then manually create a tree structure wf tpl’s for each language/wayfinder...?

                    //if the snippet call can’t go from tv then @chunk would do it or just use {{[%lang%]wayfinder}} smiley

                    Hmm...
                    [+wf.title+] - text for the link title
                    [+wf.linktext+] - text for the link display

                    I dunno...
                      • 20413
                      • 2,877 Posts
                      To really be Lingual and not EasyLingual you would have to create
                      multiple documents...

                      Title and alias have to be default language (english Id say).


                      &textOfLinks - (menutitle)
                      what database field do you want the actual link text to be? Use the following values: menutitle, id, pagetitle, description, parent, alias, longtitle, introtext

                      So if using introtext..... TRY IT!!
                        @hawproductions | http://mrhaw.com/

                        Infograph: MODX Advanced Install in 7 steps:
                        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower