We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4429
    • 429 Posts
    Quote from: elz64 at May 28, 2009, 07:54 AM

    hhh..
    You should have some html skill isnt’it ? just look at the img tag

    This a question of css or you can modify the template chunck use for this ’flag menu’ and delete the text from the <a> tag

    <li class="[+wf.classnames+]"> <a href="[[link_to_language?id=`[+wf.docid+]`&link=`[+wf.link+]`&actualid=`[*id*]`]]" title="[+wf.description+]"><img src="[(base_url)]assets/images/flags/[+wf.linktext+].gif" alt="[+wf.linktext+]"  /> [+wf.title+]</a></li>


    see ? here :
    .....<img src="[(base_url)]assets/images/flags/[+wf.linktext+].gif" alt="[+wf.linktext+]" />&nbsp;[+wf.title+]</a>

    Thanks - I just blindly copied and pasted the original code without really thinking about it. I had tired to style them and use text-indent: -999px; but that didnt work.

    You solution well.

    Thank you.
      • 4429
      • 429 Posts
      Everything has worked well so far, but I have now been asked to add the name of the language, when the user hovers over the flags. With a simple list and images this is easy but how do i do it with this solution?

      Thanks
        • 7690
        • 166 Posts
        I have made my site with 2 languages with this tutorial:
        http://modxcms.com/forums/index.php/topic,29597.0.html

        But the problem is now, that i can’t get the &hereclass correctly.

        The ACTIVE class is in the language selector. And i can’t figure out why:
        <ul  id="sprachwahl">
        	<li class="active"><a href="http://127.0.0.1/wnh/nl/aanbiedingen.html"><img src="/wnh/assets/templates/wnh/images/nl.gif" alt="nl" /></a></li>
        <li class="last"><a href="http://127.0.0.1/wnh/cn/aanbiedingen.html"><img src="/wnh/assets/templates/wnh/images/cn.gif" alt="cn" /></a></li>
        
        	</ul>


        But it has to be in:
        <ul><li><a href="http://127.0.0.1/wnh/" title="Home" id="nRed">Home</a></li>  
        <li><a href="/wnh/nl/aanbiedingen.html" title="Aanbiedingen" id="nPurple">Aanbiedingen</a></li>  
        <li><a href="/wnh/nl/recepten.html" title="Recepten" id="nGreen">Recepten</a></li>  
        </ul>
        



          • 8790
          • 526 Posts
          Hi,

          I don’t know if some of you have the same question I have :

          We re trying to improve some lacks in this multilang system.
          Most of all the main lack is the (not) nlogin management.

          We are trying some handmade solution to deal with the routing to the correct LOGIN page (wich is unique by definition in MODx) and that must be, now, in the correct language too.

          So we created in the folder that contains ’errorpage’ and some other stuff a ’go-login’ page wich is referenced into the MODx configuration as the "goto for login".

          However we are now paining to recreate the natural routing process of MODx:

          • url requested (protected) -> redirection by MODx to the referenced page ’go-login’ ->back to requested page once loged
          • Now we have introduced a supplementary level of redirection with a ’redirect’ snippet that goes to the current language login page. (checks language cookie...)
          • At this point MODx will lost the original route process and won’t be able anymore to go back to the first requested page then,
          • once the user has loged in, we should invent a process to recreate the re routing to the first requested url.
          Well this is not done yet.

          Any suggestion will be appreciated.

          Thank you
            Schtroumpf Grognon - Grouchy Smurf
            ---------------------------------
            Faites pas attention.. - Don&#39;t pay attention
            http://www.dzi-neo.net
            • 4377
            • 15 Posts
            I have a question which i cant quite answer myself after reading this topic.

            Is it necessary to keep the different languages identical to each other? So if you create an extra page on the english part should it be created on the other languages as well?

            thanks in advance.
              • 4429
              • 429 Posts
              Quote from: bvandorp at Jul 20, 2009, 04:32 AM

              I have a question which i cant quite answer myself after reading this topic.

              Is it necessary to keep the different languages identical to each other? So if you create an extra page on the english part should it be created on the other languages as well?

              thanks in advance.

              Only if you want that page translated into the different language. E.G say you have a page called "products" for each language. When you click on the country icon you are taken to the product page of that country. If you don’t have the same content in each language you are best to only use the flags, language selector on the home page of each countries site, see link removed
                • 349
                • 76 Posts
                Quote from: c-m at Jul 13, 2009, 03:10 AM

                Hi sorry to bother you. But I was wondering how your website redirects to different TLDs as I need to do this for a site at www.naturediet.co.uk
                So you want different TLDs, huh? There you go smiley

                Make a new Plugin "redirectDomain" (or name it whatever you like)
                and check "OnWebPageInit" under Events.
                Insert following Code:
                $e = &$modx->event;
                $domains[] = array('url'=>'www.mydomain.de','id'=>72);
                $domains[] = array('url'=>'www.mydomain.ch','id'=>920);
                $domains[] = array('url'=>'www.mydomain.fr','id'=>242);
                $domains[] = array('url'=>'www.mydomain.nl','id'=>494);
                $umleitung = false;
                $host = $_SERVER['HTTP_HOST'];
                
                if($e->name=='OnWebPageInit') {
                	foreach ($domains as $domain){
                	// Wenn beim ersten Aufruf der Seite (site_start) der host == URL ist
                		if($host == $domain['url'] && $modx->documentIdentifier == $modx->config['site_start']){
                			$modx->sendRedirect($modx->makeUrl($domain['id'], '', '', 'full'));
                			exit;
                		}
                	}
                }


                In the array $domains enter your domainnames and the id of the corresponding parent folder and you have it.

                Hope i could help. Let me know if something doesn´t function as expected.

                Carl: Please don´t send your messages as private because other people could answer as well, or maybe someone is interested in your question and or the solution.

                Greetings
                aceman
                  • 3325
                  • 21 Posts
                  Hey,

                  Is the only way to see what language you’re in (whe you have language specific images or text) when you are in PHP code this variable: $_COOKIE[’LanguageID’]???

                  Thanks!
                    • 22015
                    • 3 Posts
                    Question.... is there a need or good reason to use the iso country codes? It’s a language option so wouldn’t it be logical to go for iso language codes like en for english and sv for swedish
                      • 11411
                      • 2 Posts
                      Hi,

                      Can anybody update the tutorial here as well as the wikis one (http://wiki.modxcms.com/index.php/Make_Multi_Lingual_Site) with proper (step by step) way to build multilingual website in Revolution?!? As newby I have no idea how to use context mentioned somewhere before and I’m not sure if it’s worth to learn the older versions of MODx to find out that there is no point to use those methods on Revolution...

                      Thanks in advance smiley