Enable Browser Language Detection

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Holian
Registered User
Posts: 8
Joined: Tue Jan 12, 2010 8:00 pm

Re: Enable Browser Language Detection

Post by Holian »

Dear Martin!

I need your help with this.. first i edited the session.php (checked. I think i do it well. But my HTTP_ACCEPT_LANGUAGE part was commented sor first i uncommented it...

Then i edited my style.php but that runis my style. I try to epmty the cache in AVP. Reactivate the style..but no luck.. I tried with SubS2 and its work well. I use Emuza template..
Could your suggest me something?
newn
Registered User
Posts: 98
Joined: Fri Apr 25, 2008 6:06 pm

Re: Enable Browser Language Detection

Post by newn »

Hello. I'v installed and double checked that and it's still not working. I was at my friend's computer and had Lithuanian browser (Actually Windows 7 with Lithuanian pack, so IE8 naturally lithuanian) and it didn't changed it. I'v cleared his cache and website's cache... If you want, i could put in some other language for testing (forum's still not public anyways). I'v got latest version of phpbb too. I mean 3.0.6.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Enable Browser Language Detection

Post by Martin Truckenbrodt »

Hello,
Please check the file edits again.

I've got troubles on one of my boards after upgrading phpBB 3.0.5 to 3.0.6. Here I had to install the MOD again.

Please check if the language setting of your browser is set to the language you are testing.
And please don't forget that this MOD is working only for guest users. It's not working if you are logged in into the board.

The MOD is working with prosilver and subSilver2. I haven't tested any other style.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
newn
Registered User
Posts: 98
Joined: Fri Apr 25, 2008 6:06 pm

Re: Enable Browser Language Detection

Post by newn »

Yes, he wasn't logged in. And yes, the code's the same as in that post. That could be because of my theme - 1Game if you mentioned other themes. Well, i guess i'll leave it like this then...
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Enable Browser Language Detection

Post by Martin Truckenbrodt »

Hello newn,
the file edit in ./style.php is not very important. It's only need for guest postings to display the buttons not in board default langauge.

Just try it without this edit. Edit only ./includes/session.php .

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
User avatar
marxo
Registered User
Posts: 10
Joined: Mon Jan 05, 2009 12:35 am

Re: Enable Browser Language Detection

Post by marxo »

It doesn't want to recognize Serbian Cyrillic (sr_x_cyr) language. I'm not sure what's the problem, although again, I'm not sure that the ISO code is proper here. I see it is defined in common.php with USER_LANG as "sr-rs" but still my browser doesn't recognize it.

Works perfectly with pt-BR though. Any solution?
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Enable Browser Language Detection

Post by Martin Truckenbrodt »

Hello marxo,
I've done a short look to IE6 and FF3.5. Both browsers are submitting sr . So IMO it should work. I will have a more detailed look to it next days.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Enable Browser Language Detection

Post by Martin Truckenbrodt »

Hello marxo,
I've done another look to the browsers.

It seems that FF only knows sr. IE6 knows sr (for both latin and cyrill) and sb (without comments). IE8 knows sr-cyrl-cs, sr-cyrl-ba, sr-latn-cs and sr-latn-ba, but not any sb. Opera 10 only knows sr, too.

This is the strangest case I have had since I've been starting this MOD!

If you have both lang_sr and lang_sr_x_cyr installed then the MOD can not work properly. It can not give you the right font surely. You just can try to get the language packages installed in a good order. So one language pack will be checked before the other one. Don't test it on a production enviroment! Uninstalling phpBB3 language packs can give you some troubles with your users!

Okay, IE6 is dying on July 2010, together with Windows 2000. So at the moment you only can try to get it running with IE8 in a better way. Here it would be needed to change the phpBB3 names for the language packs. I would suggest:
lang_sr_cyrl for serbian cyrillic
lang_sr_latn for serbian latin

For FF and Opera you have to decide only to use only one serbian language pack or at least to inform your users about the settings at the UCP.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
User avatar
marxo
Registered User
Posts: 10
Joined: Mon Jan 05, 2009 12:35 am

Re: Enable Browser Language Detection

Post by marxo »

Martin Truckenbrodt wrote:Hello marxo,
I've done another look to the browsers.

It seems that FF only knows sr. IE6 knows sr (for both latin and cyrill) and sb (without comments). IE8 knows sr-cyrl-cs, sr-cyrl-ba, sr-latn-cs and sr-latn-ba, but not any sb. Opera 10 only knows sr, too.

This is the strangest case I have had since I've been starting this MOD!

If you have both lang_sr and lang_sr_x_cyr installed then the MOD can not work properly. It can not give you the right font surely. You just can try to get the language packages installed in a good order. So one language pack will be checked before the other one. Don't test it on a production enviroment! Uninstalling phpBB3 language packs can give you some troubles with your users!

Okay, IE6 is dying on July 2010, together with Windows 2000. So at the moment you only can try to get it running with IE8 in a better way. Here it would be needed to change the phpBB3 names for the language packs. I would suggest:
lang_sr_cyrl for serbian cyrillic
lang_sr_latn for serbian latin

For FF and Opera you have to decide only to use only one serbian language pack or at least to inform your users about the settings at the UCP.

Bye Martin
By Microsoft's LCIDs, there are sr-Cyrl-CS, sr-Latn-CS, sr-Cyrl-RS, sr-Latn-RS, sr-Cyrl-BA, sr-Latn-BA, sr-CS, and sr-RS, and serbian for Montenegro is not defined yet. So i guess that only sr, should do the trick?
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Enable Browser Language Detection

Post by Martin Truckenbrodt »

Hello marxo,
if you have only one serbian phpBB3 language pack installed which name is beginning with sr then every browser language beginning with sr should do it.

I will test it on one of my boards next week. This week I'm too busy.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: Enable Browser Language Detection

Post by Bramster. »

Is this mod still needed in 3.0.7, or . ................. ?
User avatar
marxo
Registered User
Posts: 10
Joined: Mon Jan 05, 2009 12:35 am

Re: Enable Browser Language Detection

Post by marxo »

Martin Truckenbrodt wrote:Hello marxo,
if you have only one serbian phpBB3 language pack installed which name is beginning with sr then every browser language beginning with sr should do it.

I will test it on one of my boards next week. This week I'm too busy.

Bye Martin
Been trying this but it ain't working. Any luck on your end?
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Enable Browser Language Detection

Post by Martin Truckenbrodt »

Hello Bramster,
the MOD still is needed for 3.0.7. And it's still compatible wth 3.0.7-pl1.

Hello marxo,
I've done a test installation: http://www.martin-truckenbrodt.com/cgi/phpBB3test/
En is default language. Second installed language pack is sr_x_cyr .

I've tested successfully with IE8 and FF3.5.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: Enable Browser Language Detection

Post by Bramster. »

I just installed it (AND the Language Selection Mod) and it all runs fine on 3.0.7PL1.

Thanks for the great mod !
User avatar
nuworld
Registered User
Posts: 339
Joined: Sat Oct 17, 2009 8:28 pm

Re: Enable Browser Language Detection

Post by nuworld »

Now sure if this is an issue with my board or not.
I installed this Mod and it works great as far as i can tell.
I even tested it with my wife's computer. ( she is Chinese and she has the Chinese windows xp OS)

The mod worked great.

But today i was looking in my ACP and was looking at my Admin logs.

This is what i found.

Image


Now as you can see (Nuworld) is mine.
Look at the one just below mine.
The IP address is the same.

BUT!!! all the other IP's below mine are from China.
Sorry for the screen shot being cut off short.
The part you all can't see says this.
Anonymous 220.181.94.231 Thu Mar 18, 2010 8:49 pm Imageset misses “zh_cmn_hans” localisation
» AeroRed
Anyone know whats up with this?
Locked

Return to “[3.0.x] MOD Database Releases”