On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello to everyone here,

    I’m new to the MODX communiy and chose to use MODX for my next project. Now, this project is a multilingual one. So a good understanding of the YAMS module will be essential.

    I struggled a lot to get things up and running, due to a lack of documentation. Inside the documentation of the module, well call me stupid but I could not understand a lot of it.

    I now have a multilingual template, can enter most of the multilingual content and got wayfinder to output the right menu-titles. So its working... smiley

    Since I’m new to Modx, i’m just getting arround of using the chunks and snippets. But how do I make a chunk and apply a language identifiers inside the chunks code so that it outputs the correct language?

    Can anyone send me an example or something so that I can understand it better?

    I would also like a simple language chooser, how do i create such a menu? Right now i got it to work but only by inputting dirrect links inside the template that links to the home page of that language.

    Then asside from this problem, when i make a new resource I have tabs named after the languages I configured but all the languages and input fields show up under the first tab. How do I fix that?

    Any help will by highly appreciated.

    Thijs
    • Hi @Thijs.

      Welcome to MODx and to YAMS.

      Quote from: thijsvandamme at Nov 22, 2009, 08:36 PM

      I struggled a lot to get things up and running, due to a lack of documentation. Inside the documentation of the module, well call me stupid but I could not understand a lot of it.
      I agree that there is lots of scope for improving the documentation. Any feedback on how it could be improved would be gratefully received. Which versions of YAMS and MODx are you using by the way?

      Quote from: thijsvandamme at Nov 22, 2009, 08:36 PM

      Since I’m new to Modx, i’m just getting arround of using the chunks and snippets. But how do I make a chunk and apply a language identifiers inside the chunks code so that it outputs the correct language?
      The best way to do it is as follows. Create one chunk for each language. Use the following naming convention to name the chunks mychunkname_langid. eg: mychunkname_en, mychunkname_fr etc. Then, to include the correct chunk in your document use this snippet call:
      [[YAMS? &get=`chunk` &from=`mychunkname`]]


      See
      Modules>YAMS>Documentation>Snippet
      and (
      Modules>YAMS>Documentation>How To?

      for more info.

      Quote from: thijsvandamme at Nov 22, 2009, 08:36 PM

      I would also like a simple language chooser, how do i create such a menu? Right now i got it to work but only by inputting dirrect links inside the template that links to the home page of that language.
      Use one of the following snippet calls:
      [[YAMS? &get=`list`]]

      or
      [[YAMS? &get=`selectform`]]


      The output can be customised using the &beforetpl, &repeattpl, &currenttpl and &aftertpl template parameters. You might want to take a look at this post which explains how to use these parameters to make a list of flags.

      Quote from: thijsvandamme at Nov 22, 2009, 08:36 PM

      Then asside from this problem, when i make a new resource I have tabs named after the languages I configured but all the languages and input fields show up under the first tab. How do I fix that?
      You’ll need to make sure you have the ManagerManager plugin installed and correctly configured for use with YAMS to get the tabbed interface. (It’s installed by default with MODx 1.0.2.) Here are the instructions from the most recent version of the YAMS readme.txt:

      To set up ManagerManager so that it provides a tabbed document interface, please
      do the following:

      1. Check that the ManagerManager plugin is installed under
      Elements > Manage Elements > Plugins. If not, it can be obtained from the
      MODx repository:
      http://modxcms.com/extras/package/?package=255
      The latest version is generally recommended, but please keep an eye on the
      forums for reports of any problems.
      2. Modify the ManagerManager plugin configuration so that it knows to find
      custom ManagerManager rules in a chunk called mm_rules. In newer versions
      this can be set using the configuration tab. In older versions this is done
      by including the line
      $config_chunk = ’mm_rules’;
      in the plugin code.
      3. Under Elements > Manage Elements > Chunks, create a chunk called mm_rules and
      add the following line:

      require( $modx->config[’base_path’] . ’assets/modules/yams/yams.mm_rules.inc.php’ );

      If you are already using custom ManagerManager rules, then it is advisable to
      place the YAMS require line at the end of the rules.
      This will work with the latest YAMS alpha version, which I would recommend using/upgrading to at this stage. If you are using and want to stick with the 1.0.5 beta version, then you may find the patch for YAMS 1.0.5 beta and Evo 1.0.2 provided by @ddim useful.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • Thanks for the information, I’m going to try these solutions out and post back here if something goes wrong.

        Your help is much appreciated.

        Thijs
        • Everything worked like a charm... thanks again!