I would like to change the content of blocks based on the country the respective IP translates to. For example, if the IP translates to Germany, the content of the block changes to a specific link in Germany (e.g. a specific German company or organization). One use would be automatically changing the language based on the country, but I would also like to apply to advertising.
I looked through the Sentinel code and found a spot where the ip2country data is queried and I have looked through the respective tables, so I think I have a handle of what to do. I was hoping to find an existing function where I could simply pass the IP address and it returns the country code. Does anyone know of something like this? Any assistance would be appreciated.
Joined: Dec 19, 2004 Posts: 3143 Location: Germany:Moderator German NukeSentinel Support
Posted:
Fri Apr 16, 2010 4:43 am
Because there is no automatic browser check I would just set up different blocks for the other languages. This is the simple solution.
So if someone clicks the German language button he will see different blocks and there is also a fix for the block titles available.
That is obviously a good idea, but I have been trying to avoid activating the multi-language function. The only thing that is currently in the respective language is the PHPNuke stuff. All of my content is English and IMHO having part of the site in the selected language and part in English looks odd. I have been slowly modifying my code to work with multiple languages, but I am not there yet. Also, if the user does not choose a language, then don't see the different blocks. So, I was trying to come up with a way that was independent of whether they chose the language or not and thought about the IP address. This is obviously not 100% accurate, but IMHO more reliable than having them choose a language.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum