Slug reconization
-
Hello,
I have a multilingual website using WPML and the WPML language redirection is turned off because this is too slow and client side. i have tried doing this server side but with my hosting (WPEngine) this cannot be done because its caching all wordpress files.
Let me explain what i am trying to do.
When someone visits http://www.example.com/nl/myslug i would like to check if a cookie has been set with the language settings, if it has no cookie i would like to direct it to a template what looks like a blank page (this for loading time of this page) where it checks the users IP client side using a external script and sets this language cookie.
IF the country code of the ip is equal to the country code provided in the slug i would like the page to load, if not i would like to redirect it to its translation.
I just need to know where is the best spot to intercept the page required to load in code so i can redirect it to the template where i can perform this client side IP check.
ANyone has any idea how i am able to do this ?
The topic ‘Slug reconization’ is closed to new replies.