[ Video Sharing CMS v4 ] How to automatically detect language by Ip Users ???

Started by aleksey,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alekseyTopic starter

Hello,

so little question how to do detection of language by Ip user ?

Thank you
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

alekseyTopic starter

Hello Mario,

So i have already 3 Language on website but many things very hard in PhpVibe on Translate and redirection.

So i added the Ip detection by user its work on 1 page where user just come to website. But After...

So Example : User come to website detect language French, go to create Account all passed good, after created account he disconnect grom his account and when he click to Deconnect he redirect on English version of website... but he was on French version ...
  •  

Marius P.

So you did this,
you add current lang code for detected to the $_SESSION['phpvibe-language'] , right?

It gets cleared on logout.

Try this, open the main index.php and find this:

//If action is logout, kill sessions
        user::clearSessionData();



replace it with:


$cl = current_lang();
//If action is logout, kill sessions
 user::clearSessionData();
$_SESSION['phpvibe-language'] = $cl;
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

alekseyTopic starter

  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

maldboy

  •  

Similar topics (7)