We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8522
    • 145 Posts
    Hi
    I’m building a multilanguage website with 3 context (one for each language, mydomain.com/de mydomain.com/en). The context share the same templates, chunks, assets, snippets. I like the way hk_modx described multilanguage websites, see here: http://modxcms.com/forums/index.php/topic,43806.msg298361.html#msg298361

    My goal is currently to have a language menu (linking between context) that points to each site_start, but I didn’t find an elegant solution yet.

    At this point hardcoded a little language navigation (see exmaple below) and I wondered if there could be a more flexible way that grabs all the site_starts from each context and builds a wayfinder like navigation.


    <div class="language">
    <ul>
    	<li[[!if? &subject=`[[++site_start]]` &operand=`8` &then=` class="active"`]]>
    		<a href="[[~8]]">English</a>
    	</li>
    	<li[[!if? &subject=`[[++site_start]]` &operand=`2` &then=` class="active"`]]>
    		<a href="[[~2]]">Deutsch</a>
    	</li>
    	<li class="last[[!if? &subject=`[[++site_start]]` &operand=`68` &then=` active`]]">
    		<a href="[[~68]]">Russian</a>
    	</li>
    </ul>
    </div>


    Currently feels like I handcode wayfinder myself. Has anybody come up with a more elegant solution than this?
      • 8522
      • 145 Posts
      For all who haven’t seen, there is now the babel plugin 1.1 rc1 by saerni

      http://modxcms.com/extras/package/757

      (which approaches to solve all issues: adding translation button to manager, automatically crosslinking between resources in the frontend as well as in the manager, also has ability to share specified tv’s)