[RFC] Override Language via URL

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
MartinTruckenbrodt
Posts: 171
Joined: Sun Jan 29, 2006 1:00 pm
Location: Germany
Contact:

Re: [RFC] Override Language via URL

Post by MartinTruckenbrodt » Thu Jun 07, 2012 8:28 pm

Hello,
another way I found to do it is to add a new field to SESSIONS_TABLE. E.g. call it session_lang . This field needs to been filled only if a user has a selected a different language from the dropdown menue. Then you need only a Reset button. And for registered user you can add a Save button to update their user_lang. Just have a look here: http://www.martin-truckenbrodt.com/cgi/phpBB3AMLS/

I think the cookie thing is a bad thing. And the lang by URL thing is more like a workaround. But this is only my personal opinion.

Bye Martin
Advanced Block MOD 1.1.1 has been released! - Prevent spam on your phpBB3 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists! - My MODs

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Override Language via URL

Post by naderman » Fri May 02, 2014 10:55 pm

Possible now with ?language=<language code> - it's stored in a language cookie until overridden again either through the URL or language dropdown on registration.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Override Language via URL

Post by VSE » Fri May 02, 2014 11:08 pm

^^ Stored in a cookie that lasts for the duration of your browser session.
Has an irascible disposition.

User avatar
spello
Registered User
Posts: 26
Joined: Fri Aug 31, 2012 12:13 pm
Contact:

Re: [RFC] Override Language via URL

Post by spello » Fri Jul 18, 2014 11:14 am

What about automatic language selecting depending on system/browser language?

leschek
Registered User
Posts: 161
Joined: Tue Aug 28, 2012 1:30 pm

Re: [RFC] Override Language via URL

Post by leschek » Tue Feb 03, 2015 3:32 pm

naderman wrote:Possible now with ?language=<language code> - it's stored in a language cookie until overridden again either through the URL or language dropdown on registration.
This is nice feature. I tried it on two boards (with three installed languages) and while it's working when I use the board as guest, I'm not able to make it work when I'm logged in.

User avatar
Allen42
Registered User
Posts: 9
Joined: Tue Aug 19, 2014 11:19 pm
Location: Sugar Land, TX
Contact:

Re: [RFC] Override Language via URL

Post by Allen42 » Sat Mar 07, 2015 3:35 am

If I think this one may translate your live forum URL into another language (appearing as "es.<your live forum URL>"), then can it be working or maybe it's a site issue something like that? It's impossible.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1724
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Override Language via URL

Post by DavidIQ » Sat Mar 07, 2015 6:55 pm

You could set up that sub-domain to redirect to the proper URL with the translation parameter in the redirected address. So for example http://es.phpbb.com can be set up to redirect to http://www.phpbb.com/community/index.php?lang=es to take advantage of the change done in this RFC. Through some .htaccess rewrite rules you could even handle multiple URL types which could include forum, topic, or post links.
Image

User avatar
Volksdevil
Registered User
Posts: 84
Joined: Tue Sep 04, 2012 2:17 pm
Contact:

Re: [RFC] Override Language via URL

Post by Volksdevil » Tue Mar 17, 2015 3:27 am

I'm all for more audience coverage when it comes to language, but extra parameters bother me. Unless they won't have any negative effect? (Thinking of being indexed/multiple url's etc)

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Override Language via URL

Post by VSE » Tue Mar 17, 2015 10:58 pm

leschek wrote:This is nice feature. I tried it on two boards (with three installed languages) and while it's working when I use the board as guest, I'm not able to make it work when I'm logged in.
A logged in user can select a language in preferences. Visitors can not, which is why this only works for visitors. And this was not a casual choice, there were also many issues trying to get it to work for everybody, and it's not worth all the trouble it was, so the current implementation was decided to be the best trade off.
Has an irascible disposition.

leschek
Registered User
Posts: 161
Joined: Tue Aug 28, 2012 1:30 pm

Re: [RFC] Override Language via URL

Post by leschek » Fri Mar 20, 2015 5:02 pm

VSE wrote:
leschek wrote:This is nice feature. I tried it on two boards (with three installed languages) and while it's working when I use the board as guest, I'm not able to make it work when I'm logged in.
A logged in user can select a language in preferences. Visitors can not, which is why this only works for visitors. And this was not a casual choice, there were also many issues trying to get it to work for everybody, and it's not worth all the trouble it was, so the current implementation was decided to be the best trade off.
Thank you for explanation. I thought it's bug.

Post Reply