Right now we have two parallel websites - one in English, one in Italian. If someone clicks on a membership link then we can pass the correct parameters to the signup page such as lang=it and price_group=-1 and this works perfectly. However, if a non-member tries to access a restricted area they get the login page and then must click to sign-up as a new user. When that happens, the page is always signup.php and no parameters are passed. It seems to me that some logic could be added to determine the current language (or if the user changes the language) and send the correct parameters to signup.php. I mean something like. If lang=it then signup$=signup.php?lang=it&price_group=-1. Changing the language by itself only changes the descriptors in the left column but does not change the product descriptions. Would appreciate any insights as to where/how to add the logic. Thanks!
Try to add this at the top of signup.php and member.php pages: Code: session_start(); if($_SESSION[amember_lang] == 'it'){ $_REQUEST[price_group] = $_GET[price_group] = -1; } let me know if this will not help.
This does work as far as changing the price group to -1, however a language change back to English still passes the price_group = -1 parameter. I tried adding if($_SESSION[amember_lang] == 'en'){ $_REQUEST[price_group] = $_GET[price_group] = 0; but it generated an error (also tried adding ELSE instead of IF but it still generated an error). I don't know the syntax of PHP but we need to test for the language and send the appropriate price_group. This would be a useful option to add to the next release of aMember. I think an option in the Language section where you can link a language to a price_group would be helpful. The way it is now, the price_group always defaults to the 0 group regardless of the language setting. So, we are getting English product descriptions with Italian explanatory text.
Your code: PHP: if($_SESSION[amember_lang] == 'en'){ $_REQUEST[price_group] = $_GET[price_group] = 0; will throw up an error as there is no closing '}'
Thanks...I had the closing brace, but what it needed was ELSEIF rather than IF or ELSE. It works perfectly now. PHP: session_start();if($_SESSION[amember_lang] == 'it'){$_REQUEST[price_group] = $_GET[price_group] = -1;}elseif($_SESSION[amember_lang] == 'en'){$_REQUEST[price_group] = $_GET[price_group] = 0;}
As a followup to this issue: The Italian language signup is displaying perfectly with Italian translation. But what is happening now is that the error messages are coming up in English. I checked the language file and all the error messages are translated. I think this is a program logic issue. Alex: Any suggestions on how to add logic to make the error messages match the selected language?
That's probably the infamous "jquery.validate.js vs jquery.validate.pack.js" situation. Here's how to edit/change the text: http://www.amember.com/forum/showthread.php?t=10900 However, I don't know if you can make it multi-lingual...
The jquery file is only part of the story. There are a number of error responses in the language file that pertain to the signup process. At least, there should be a way to get the right language to display.