Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 05-10-2007, 01:25 PM
tommaso Offline
forum loafer
 
Join Date: Feb 2007
Location: Italy
Posts: 19
autodetect language

Hi!
I'm using language feature of pixelpost 1.6 and it's fine.
I'm guessing if is there a way to automatically detect if use English or the other language when somebody visits my site.
(reading here and there I think it is not possible now)

How can it be done?

thanks anyway,
bye
Tommaso
TomSights.net
Reply With Quote
  #2  
Old 05-10-2007, 03:45 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
You can detect the browser language, or you have to reverse lookup the ip to get a country.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #3  
Old 05-10-2007, 04:21 PM
tommaso Offline
forum loafer
 
Join Date: Feb 2007
Location: Italy
Posts: 19
I think reverse ip lookup may be too heavy.

Should be used JS or PHP.

JS: may be fine because simple and usable in the template but... not so much clean solution.
PHP: using $_SERVER["HTTP_ACCEPT_LANGUAGE"] variable should work, but it must be placed in alt language mechanism (index.php?). (also a grep in $_SERVER["HTTP_USER_AGENT"])

via htaccess?

Do you think you'll put this feature in future releases?

bye
Reply With Quote
  #4  
Old 05-10-2007, 05:17 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
I'll can look at it. But what about users like me: english windows/browser, dutch language? The blog will be in English instead of dutch.

JScript in the template won't work (or it should be a redirect to another url).
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #5  
Old 05-10-2007, 08:44 PM
tommaso Offline
forum loafer
 
Join Date: Feb 2007
Location: Italy
Posts: 19
You're right, in that case it won't work.
The idea is to use english (or main language) for all except alternative language if detected.

Ok, thanks for the talk, I'll try to figure it out too. Although I have firstly to understand the whole mechanism.

bye
Reply With Quote
  #6  
Old 05-11-2007, 06:35 AM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
I am working with a shop software for customers and I know they did a lot of work on the autmatic language detection and failed.
Obviously there are many browsers which don't send the HTTP_ACCEPT_LANGUAGE or send it wrong. On the other hand it was said that it would slow down things.

You have to do several requests for that: reading out the HTTP_ACCEPT_LANGUAGE, remove the eventual additional subtags down to the pure language tag, look if it matches the alternative language abbreviation of pixelpost setting and then change the language accordingly. Always with the risk of getting some crowded tags or nothing.

Of course it would be nice: My default language in the blog is english since most of my visitors are international. The alternative language is german (because I speak german :-)), and it would be great if german visitors would have the site in german from the beginning.

But in my opinion the cookie based system we have now is a very good and simple alternative.

KArin
__________________
Uh!log Photoblog
My Addons
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:31 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs