• Welcome to WooUSEFUL by PHPVIBE . Please log in.

[ 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

If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

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

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;
If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

alekseyTopic starter

  •  

Marius

If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

maldboy

  •  

Similar topics (7)