<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Different languages - small problem ??</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Different-languages---small-problem-80138</link>
        <description></description>
        <pubDate>Sat, 14 Mar 2026 06:47:04 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Different-languages---small-problem-80138" rel="self" type="application/rss+xml" />

                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237100#post2237100</link>
          <description><![CDATA[<p>Found it !!   Thx Greg !</p>]]></description>
          <pubDate>Tue, 14 Jul 2015 13:51:46 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237100#post2237100</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237099#post2237099</link>
          <description><![CDATA[<p>No errors, but nothing is showing either...</p>]]></description>
          <pubDate>Tue, 14 Jul 2015 12:59:58 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237099#post2237099</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237097#post2237097</link>
          <description><![CDATA[<p>Hey Kovali,</p>
<p>I've created a basic integration below:</p>
<p><code>&lt;div id="Container" class="container"&gt;<br />  &lt;?php foreach ($projectenRecords as $record): ?&gt;<br /><br />    &lt;?php<br />      $len = count($record['categorie:values']); <br />      foreach($record['categorie:values'] as $key =&gt; $catVal){<br /><br />        @list($dutchCat, $frenchCat, $englishCat, $germanCat) = explode(' - ', $catVal);<br /><br />        echo $dutchCat;<br />        if ($key != $len - 1) {<br />          echo ",";<br />        }<br /><br />      }<br />    ?&gt;<br />  &lt;?php endforeach ?&gt;<br />&lt;/div&gt;</code></p>
<p>Could you try replacing your current code with the code above and let me know if it works, and if it not could you tell me any errors you get? </p>
<p>Cheers,</p>
<p>Greg</p>]]></description>
          <pubDate>Tue, 14 Jul 2015 11:20:42 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237097#post2237097</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237095#post2237095</link>
          <description><![CDATA[<p>Sorry Greg, I get the idea but I'm afraid I don't quite understand all of the code you used.</p>
<p>I tried to transfer your code to my webpage, but don't get the desired result, yet:</p>

<p>&lt;div id="Container" class="container"&gt;<br />&lt;?php foreach ($projectenRecords as $record): ?&gt;</p>
<p>&lt;?php $len = count($record['categorie:values']); ?&gt;</p>
<p>&lt;?php foreach($record['categorie:values'] as $key =&gt; $catVal){</p>
<p>@list($dutchCat, $frenchCat, $englishCat, $germanCat) = explode(' - ', $catVal);<br /><br /> echo $dutchCat;<br /><br /> } ?&gt;<br /><br />&lt;?php if ($key != $len - 1) {<br /> echo ",";<br /> } ?&gt;</p>

<p><br />&lt;div class="mix &lt;?php @list($dutchCat, $frenchCat, $englishCat, $germanCat) = explode(' - ', $record['categorie']);<br /> echo $dutchCat; ?&gt;"&gt;</p>
<p>&lt;?php foreach ($record['intro_foto'] as $index =&gt; $upload): ?&gt;<br /> &lt;a href="/NL&lt;?php echo $record['_link'] ?&gt;"&gt;&lt;img src="&lt;?php echo htmlencode($upload['urlPath']) ?&gt;" class="scalable" /&gt;&lt;/a&gt;<br /> &lt;?php endforeach ?&gt;<br /><br /><br /> &lt;div class="textwrap"&gt;<br /> &lt;h3&gt;&lt;?php echo htmlencode($record['title']) ?&gt;&lt;/h3&gt;<br /> &lt;p&gt;Locatie: &lt;?php echo htmlencode($record['locatie']) ?&gt;&lt;/p&gt;<br /> &lt;p&gt;Categorie: &lt;?php @list($dutchCat, $frenchCat, $englishCat, $germanCat) = explode(' - ', $record['categorie']);<br /> echo $dutchCat; ?&gt;&lt;/p&gt;<br /> &lt;p&gt;Status: &lt;?php @list($dutchStat, $frenchStat, $englishStat, $germanStat) = explode(' - ', $record['status']);<br /> echo $dutchStat; ?&gt;&lt;/p&gt;<br /> &lt;/div&gt;<br />&lt;/div&gt;<br />&lt;?php endforeach ?&gt;</p>
<p><br /> &lt;div class="gap"&gt;&lt;/div&gt;<br /> &lt;div class="gap"&gt;&lt;/div&gt;<br />&lt;/div&gt;</p>]]></description>
          <pubDate>Tue, 14 Jul 2015 11:02:30 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237095#post2237095</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237073#post2237073</link>
          <description><![CDATA[<p>Hey Kovali,</p>
<p>You need to cycle through each category option with a foreach loop, and then work out the language of each option. I've written some test code using a blog section I have in my test CMS:</p>
<p><code>  //Cycle through the blog posts...<br />  foreach($blogs as $blog){<br />    <br />    //Count how many blog category values we have.<br />    $len = count($blog['category:values']);<br /><br />    //Cycle through the blog category values...<br />    foreach($blog['category:values'] as $key =&gt; $catVal){<br /><br />      //Get the languages for each value.<br />      @list($englishType, $dutchType, $esperantoType) = explode(' - ', $catVal);<br />      <br />      if(/*Code to detect dutch*/){<br />        //Display dutch type  <br />        echo $dutchType;<br />      }elseif(/* code to detect esperanto*/){<br />        //Display Espernanto type<br />          echo $esperantoType;<br />      }else{<br />        //Display English type<br />        echo $englishType;<br />      }<br /><br />      //If we're not dealing with the last element in the array, display a comma.<br />      if ($key != $len - 1) {<br />        echo ",";<br />      }<br />    }<br />    echo "&lt;br&gt;";<br />  }<br /></code></p>
<p>I'm cycling through each blog category value, and then working out the language for each, then displaying the appropriate value. </p>
<p>Let me know if you have any questions.</p>
<p>Thanks,</p>
<p>Greg</p>]]></description>
          <pubDate>Fri, 10 Jul 2015 10:52:16 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237073#post2237073</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237062#post2237062</link>
          <description><![CDATA[<p>Hi Greg,</p>

<p>I've got it working for most parts of the CMS, but I also use some multi value checkboxes. Trouble is to join the values, for each language :</p>

<p>This code joins all the values, but shows all the variables in the array: &lt;?php echo join(', ', $record['categorie:values']); ?&gt; </p>
<p>This code shows only the dutch variable, but doesn't join all possible values:    &lt;div class="mix &lt;?php @list($dutchCat, $frenchCat, $englishCat, $germanCat) = explode(' - ', $record['categorie']);  echo $dutchCat; ?&gt;"&gt;</p>
<p>No good solution, I get an error:  &lt;div class="mix &lt;?php @list($dutchCat, $frenchCat, $englishCat, $germanCat) = explode(' - ', $record['categorie']); echo join(' ', '$dutchCat:values'); ?&gt;"&gt;</p>

<p>Could you get me on the right track with this one please ? Thx !!</p>]]></description>
          <pubDate>Fri, 10 Jul 2015 00:51:24 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237062#post2237062</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237046#post2237046</link>
          <description><![CDATA[<p>Hey Kovali,</p>
<p>You can extend your options to include as many languages as you want, here is how to do 3:</p>
<p><code>eenvoudig - easy - facilaj<br />moeilijk - difficult - malfacila<br />zeer moeilijk - very difficult - tre malfacila</code></p>
<p>Then on the front end of the site you could display the appropriate option like this:</p>
<p><code>//Explode the record type into an array, and add the first variable to dutchType, and the second to englishType<br />@list($dutchType, $englishType, $esperantoType) = explode(' - ', $record['type']);<br />if(/* -- code that's used to detect if dutch being used -- */){<br />  //Display dutch type  <br />  echo $dutchType;<br />if(/* -- code that's used to detect if esparanto being used -- */){<br />  //Display Espernanto type<br />    echo $esperantoType;<br />}else{<br />  //Display English type<br />  echo $englishType;<br />}</code></p>
<p>So the list function works by taking the items in an array, and adding each value in order to the variables you put in it. You can read more on it here:</p>
<p><a href="http://php.net/manual/en/function.list.php" rel="nofollow">http://php.net/manual/en/function.list.php</a></p>
<p>Cheers</p>
<p>Greg</p>]]></description>
          <pubDate>Wed, 08 Jul 2015 15:55:58 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237046#post2237046</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237039#post2237039</link>
          <description><![CDATA[<p>Thx Greg, I will give it a try... what if I would be using 4 languages ? What code should I use to explode the record into an array pls ?</p>]]></description>
          <pubDate>Tue, 07 Jul 2015 13:48:55 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237039#post2237039</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237037#post2237037</link>
          <description><![CDATA[<p>Hey Kovali,</p>
<p>What about storing both the language options for the drop down, and then only displaying one appropriate to the user's language. So I'd edit the field, and setup dropdown options like this:</p>
<p><code>eenvoudig - easy<br />moeilijk - difficult<br />zeer moeilijk - very difficult</code></p>
<p>Then on the front end of the site you could display the appropriate option like this:</p>
<p><code>//Explode the record type into an array, and add the first variable to dutchType, and the second to englishType<br />@list($dutchType, $englishType) = explode(' - ', $record['type']);<br />if(/* -- code that's used to detect if dutch or english being used -- */){<br />  //Display dutch type  <br />  echo $dutchType;<br />}else{<br />  //Display English type<br />  echo $englishType;<br />}</code></p>
<p>Let me know if you have any questions.</p>
<p>Cheers</p>
<p>Greg</p>]]></description>
          <pubDate>Tue, 07 Jul 2015 12:13:18 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237037#post2237037</guid>
        </item>
                <item>
          <title>Different languages - small problem ??</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2237034#post2237034</link>
          <description><![CDATA[<p>Hi there,</p>
<p>I'm building a website in 2 different languages, dutch and english.</p>
<p>For most of the content fields I can create a seperate record for both languages, like:</p>
<p>Projectdetails NL: &lt;?php echo $record['projectdetails_nl'] ?&gt;<br />Projectdetails UK: &lt;?php echo $record['projectdetails_uk'] ?&gt;</p>
<p>Next, I show the appropriate record for each language webpage</p>
<p><br />But I'm also using a record in CMS with dropdown menu, like:  Type: &lt;?php echo $record['type'] ?&gt;</p>
<p>Since the CMS is built in dutch language, the values in the dropdown menu are also listed in dutch, as:</p>
<p>eenvoudig<br />moeilijk<br />zeer moeilijk</p>
<p>Problem:  in the english language frontend of the website I end up with the dutch value using  &lt;?php echo $record['type'] ?&gt; </p>
<p>Is there a way to show the translation of every possible value instead of the dutch (standard) values, so like:</p>
<p>easy<br />difficult<br />very difficult</p>

<p>Thx for helping me out pls !</p>


]]></description>
          <pubDate>Tue, 07 Jul 2015 11:04:03 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2237034#post2237034</guid>
        </item>
              </channel>
    </rss>
  