[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 »

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
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Override Language via URL

Post by naderman »

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: 674
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Override Language via URL

Post by VSE »

^^ 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 »

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

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

Re: [RFC] Override Language via URL

Post by leschek »

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.

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 »

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: 1836
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Override Language via URL

Post by DavidIQ »

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 »

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: 674
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Override Language via URL

Post by VSE »

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: 163
Joined: Tue Aug 28, 2012 1:30 pm

Re: [RFC] Override Language via URL

Post by leschek »

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