<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Multilangual Website Membership</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Multilangual-Website-Membership-80389</link>
        <description></description>
        <pubDate>Tue, 09 Jun 2026 07:13:15 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Multilangual-Website-Membership-80389" rel="self" type="application/rss+xml" />

                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238262#post2238262</link>
          <description><![CDATA[<p>Seems to work fine now! Thanks !!</p>]]></description>
          <pubDate>Thu, 11 Feb 2016 00:50:42 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238262#post2238262</guid>
        </item>
                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238203#post2238203</link>
          <description><![CDATA[<p>Hi Kovali,</p>
<p>It looks like the issue is the language cookie isn't always set, so the $_COOKIE['language'] variable can only be found when setCookie('language', 'fr') is set before the website membership plugin loads. This might fix the issue:</p>
<p><code>&lt;?php<br />/*<br />Plugin Name: Website Membership<br />Description: Website membership functions for user sign-up, password reminder, login, user specific content, and login only content<br />Version: 1.10<br />Requires at least: 2.52<br />Required System Plugin: True<br />*/<br /><br />// UPDATE THESE VALUES<br /><br />$cookie_var = <span style="color:#ff0000;">@</span>$_COOKIE['language'];<br /><br />if ($cookie_var == "fr"){<br />  $GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL'] = '/fr/user-login.php';<br />}else{<br />  $GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL'] = '/user-login.php';<br />}</code></p>
<p>So the @ symbol tells the code that if there is an error, it should ignore it. In this case that stops an error appearing if it can't find anything set for the <span>$_COOKIE['language'] variable. </span></p>
<p><span>Let me know if you have any questions.</span></p>
<p><span>Cheers,</span></p>
<p><span>Greg</span></p>]]></description>
          <pubDate>Mon, 08 Feb 2016 10:33:22 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238203#post2238203</guid>
        </item>
                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238200#post2238200</link>
          <description><![CDATA[<p>Okay Ross,</p>
<p>I'm trying the solution with a cookie, but I'm getting a php error:</p>
<p><span>Notice: Undefined index: language in /home/ajkdirec/public_html/beheer/plugins/websiteMembership.php on line 14 setPrefixedCookie: Can't set cookie, headers already sent! Output started in /home/ajkdirec/public_html/beheer/plugins/websiteMembership.php line 14</span></p>
<p><span>Could you check what I'm doing wrong please ?</span></p>
<p><span>My code in the French webpages to set the cookie (at the top):</span></p>
<p><span style="color:#ff0000;">&lt;?php </span><br /><span style="color:#ff0000;">setcookie("language", "fr"); </span><br /><span style="color:#ff0000;">?&gt;</span><br /><span style="color:#ff0000;">&lt;?php header('Content-type: text/html; charset=utf-8'); ?&gt;</span><br /><span style="color:#ff0000;">&lt;?php</span><br /><span style="color:#ff0000;"> /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */</span><br /><br /><span style="color:#ff0000;"> // load viewer library</span><br /><span style="color:#ff0000;"> $libraryPath = 'beheer/lib/viewer_functions.php';</span><br /><span style="color:#ff0000;"> $dirsToCheck = array('/home/ajkdirec/public_html/','','../','../../','../../../');</span><br /><span style="color:#ff0000;"> foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}</span><br /><span style="color:#ff0000;"> if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }</span></p>
<p><span style="color:#ff0000;">...</span></p>
<p><span style="color:#000000;">My code in websiteMembership.php to read the cookie:</span></p>
<p><span style="color:#ff0000;">&lt;?php</span><br /><span style="color:#ff0000;">/*</span><br /><span style="color:#ff0000;">Plugin Name: Website Membership</span><br /><span style="color:#ff0000;">Description: Website membership functions for user sign-up, password reminder, login, user specific content, and login only content</span><br /><span style="color:#ff0000;">Version: 1.10</span><br /><span style="color:#ff0000;">Requires at least: 2.52</span><br /><span style="color:#ff0000;">Required System Plugin: True</span><br /><span style="color:#ff0000;">*/</span></p>
<p><span style="color:#ff0000;">// UPDATE THESE VALUES</span></p>
<p><span style="color:#ff0000;">$cookie_var = $_COOKIE['language'];</span></p>
<p><span style="color:#ff0000;">if ($cookie_var == "fr"){</span></p>
<p><span style="color:#ff0000;">$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL'] = '/fr/user-login.php';</span></p>
<p><span style="color:#ff0000;">}</span><br /><span style="color:#ff0000;">else{</span></p>
<p><span style="color:#ff0000;">$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL'] = '/user-login.php';</span></p>
<p><span style="color:#ff0000;">}</span></p>
<p><span style="color:#ff0000;">...</span></p>]]></description>
          <pubDate>Mon, 08 Feb 2016 01:39:03 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238200#post2238200</guid>
        </item>
                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238193#post2238193</link>
          <description><![CDATA[<p>Hi Koen.</p>
<p>I get what you mean with all the other content on the page.</p>
<p>The problem here will be that there isn't enough information for the login page to know what language the current user wants.</p>
<p>What you could do is have a cookie called "language" set on every single page. On all the French pages, set the the language cookie to "French. On all the English pages, set the language cooke to "English". And so forth.</p>
<p>Then, when they get redirected to your login, you can check the cookie.  If the cookie is set to French, redirect to the French login page.</p>
<p>Does that make sense?</p>
<p>Let me know what you think.</p>
<p>Thanks!</p>]]></description>
          <pubDate>Fri, 05 Feb 2016 08:51:18 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238193#post2238193</guid>
        </item>
                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238191#post2238191</link>
          <description><![CDATA[<p>Hi Ross, thanks for the reply.</p>
<p>I can see what you mean, but it won't work well for me because the user-login.php page has a lot of other content ( that should be in the right language when redirected to...)   </p>
<p>I saw another topic in this forum, maybe I could do something like that also ? : <a href="http://www.interactivetools.com/forum/forum-posts.php?postNum=2207991#post2207991" rel="nofollow">http://www.interactivetools.com/forum/forum-posts.php?postNum=2207991#post2207991</a> </p>
<p>I don't know much about php so maybe you could direct me in this ? The code I'm thinking of :</p>

<p>On all French website pages:</p>
<p><span style="color:#ff0000;"><strong>$language = "french";</strong></span></p>

<p>In websiteMembership.php:</p>
<p><span style="color:#ff0000;"><strong>if($language)=="french"){</strong></span></p>
<p><span style="color:#ff0000;"><strong>$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']  = '/fr/user-login.php';</strong></span></p>
<p><span style="color:#ff0000;"><strong><span>}</span></strong></span><br /><span style="color:#ff0000;"><strong><span>else{</span></strong></span></p>
<p><span style="color:#ff0000;"><strong>$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']  = /user-login.php';</strong></span></p>
<p><span style="color:#ff0000;"><strong>}</strong></span></p>
<p><span style="color:#ff0000;"><strong><br /></strong><span style="color:#000000;">Does this make any sense at all ;-) ?</span></span></p>
<p><span style="color:#000000;">Cheers,</span></p>
<p><span style="color:#000000;">Koen</span></p>
]]></description>
          <pubDate>Fri, 05 Feb 2016 02:40:44 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238191#post2238191</guid>
        </item>
                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238183#post2238183</link>
          <description><![CDATA[<p>Hi Koen</p>
<p>Thanks for posting.</p>
<p>I have an idea on how to get this working for you that involves cookies. It's rather advanced though so I want to go over a different idea that's easier to implement.</p>
<p>Basically, the easier idea is to still just have the one /user-login.php page.  But on that page, add a link to each of the other language login pages.  </p>
<p>Does that sound like it would work?</p>]]></description>
          <pubDate>Thu, 04 Feb 2016 13:25:13 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238183#post2238183</guid>
        </item>
                <item>
          <title>Multilangual Website Membership</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2238164#post2238164</link>
          <description><![CDATA[<p>Hi,</p>
<p>I've build a website in 3 languages (English, Dutch, French), now my client wants parts of the website to be for members only...</p>
<p>I've succesfully setup the Website Membership Plug-in (1-10) for the English part, but I'm having problems with the other language parts:</p>
<p>The login page is always directing to the English Login page, while I want it to show the French or Dutch login page respectively.</p>

<p>Like: <a href="http://www.mysite.be" rel="nofollow">http://www.mysite.be</a><span style="color:#ff0000;"><strong>/fr/</strong></span>user-login.php?loginRequired=1 </p>
<p>and: <a href="http://www.mysite.be" rel="nofollow">http://www.mysite.be</a><strong>/<span style="color:#ff0000;">nl</span></strong>/user-login.php?loginRequired=1</p>
<p>instead of: <a href="http://www.mysite.be/user-login.php?loginRequired=1" rel="nofollow">http://www.mysite.be/user-login.php?loginRequired=1</a></p>

<p>I can see this code in the WebsiteMembership.php: $GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']  = '/user-login.php';</p>
<p>How can I arrange this code so it will show a different page for each language please ??</p>

<p>Thanks for helping me out already !!</p>
<p>Koen</p>]]></description>
          <pubDate>Wed, 03 Feb 2016 01:47:57 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2238164#post2238164</guid>
        </item>
              </channel>
    </rss>
  