Multilingual registration and login page

Permalink 1 user found helpful
Hi everyone! I've created a site using Concrete5 5.7.5.2, and I liked this cms. I created my own template, and made my site multilingual. Everything works fine, except one thing: I can't find out how to make registration and login page to be multilingual. I tried to create a copy of registration page for each language section, but I failed (maybe I did something wrong). The way it works now through the session variable, that stores selected locale, but when registration passes, error occures. I will add debug info later (I'm at work now), but does anyone know the right way to make a multilingual registration page? I tried to search the solution, but didn't succeed.

bbrody
View Replies: View Best Answer
bbrody replied on at Permalink Best Answer Reply
bbrody
I solved my problem by storing selected locale in session varibale and get it on my registration page when I need it. The problem was that session_regenerate_id(true) was fired to renew session after user registered, and I always lost my variable.

Here is a piece of code from my registration controller:
public function do_register() {
      $locale = "ru_RU";
      if (isset($_SESSION["AI"]["Locale"])) {
         $locale = $_SESSION["AI"]["Locale"];
         Localization::changeLocale($locale);
      }
...
}

And then I use $locale to get everything work like I need in other methods.
Maybe it will be helpful for somebody.