Related Topics


[Video CMS v4]How to automatically detect language by Ip Users ???  (Read 669 times) Print

1 B


aleksey  August 23, 2014, 12:53:38 PM

Hello,

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

Thank you

Logged


@Mario  August 26, 2014, 02:39:02 PM


Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!


aleksey  August 27, 2014, 12:34:47 PM

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 ...

Logged


@Mario  August 27, 2014, 01:37:40 PM

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:

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


replace it with:


Code
$cl = current_lang();
//If action is logout, kill sessions
 user::clearSessionData();
$_SESSION['phpvibe-language'] = $cl;

Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!


aleksey  August 27, 2014, 11:28:26 PM

work well done !!!

Logged


@Mario  August 28, 2014, 02:42:44 PM


Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!


maldboy  January 12, 2015, 04:35:57 PM

work well done !!!
can you tell me how to do it and mee plz? :)

Logged