phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Override Language via URL

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

[RFC] Override Language via URL

Postby imkingdavid » Fri Dec 09, 2011 3:40 pm

This topic requested that users be able to add lang=xx to the URL query string in order to override the board's language for users who are unregistered and do not know enough of the default language or the forum layout to create an account.

This shouldn't be too big of a change, simply check the URL to see if $_GET['lang'] is present and whether or not the chosen language is available for use, and if so, override the board's default language.

EDIT: See Ticket
Last edited by imkingdavid on Sun Dec 11, 2011 10:15 pm, edited 1 time in total.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 906
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Postby callumacrae » Fri Dec 09, 2011 7:43 pm

+1

Would be nice to see in 3.1, it would be pretty easy to implement.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Override Language via URL

Postby Oleg » Sat Dec 10, 2011 6:15 pm

I somewhat agree with this:

jcr83 wrote:Any progress in this area since last year ?
I have the same problem: I want to setup a multi-lingual forum, and I would like to be able to select the forum language via the URL, for unregistered users.


In this case I'm guessing the administrator will provide links for each language that users will click on.

For a user, if you know that you can add &lang=* to the url to have the board appear in your language I'm guessing you know enough about the software to submit a registration form, go to ucp and change your language even if you don't understand a word of what is written on the site (and I believe I actually went through this once with phpbb).
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Override Language via URL

Postby imkingdavid » Sun Dec 11, 2011 2:24 am

Oleg wrote:I somewhat agree with this:

jcr83 wrote:Any progress in this area since last year ?
I have the same problem: I want to setup a multi-lingual forum, and I would like to be able to select the forum language via the URL, for unregistered users.


In this case I'm guessing the administrator will provide links for each language that users will click on.

For a user, if you know that you can add &lang=* to the url to have the board appear in your language I'm guessing you know enough about the software to submit a registration form, go to ucp and change your language even if you don't understand a word of what is written on the site (and I believe I actually went through this once with phpbb).

Good point. Perhaps a dropdown list somewhere in the header with a list of all installed languages?
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 906
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Postby naderman » Sun Dec 11, 2011 7:45 am

Yup I think a dropdown for guest users in the header would make sense in combination with the language in the URL.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Override Language via URL

Postby imkingdavid » Sun Dec 11, 2011 9:52 pm

naderman wrote:Yup I think a dropdown for guest users in the header would make sense in combination with the language in the URL.

I may be able to work on a patch for this in the coming week since it should be fairly simple to do.

Basically do a database query to get all installed language packs, populate the dropdown. Then when the dropdown value is changed append lang to the URL. Would have to be added to append_sid() as well since it would have to remain in the selected language across page changes? Or how would that be handled? Because we can't update the board default language or the guest user default language since that would change it for all guests. Perhaps a new "lang" column on the sessions table?

EDIT: Ticket posted in the tracker.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 906
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Postby Oleg » Mon Dec 12, 2011 1:03 am

http://tracker.phpbb.com/browse/PHPBB3-9663 is an earlier ticket for the same issue.
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Override Language via URL

Postby imkingdavid » Mon Dec 12, 2011 1:07 am

Oleg wrote:http://tracker.phpbb.com/browse/PHPBB3-9663 is an earlier ticket for the same issue.

Actually, that's a duplicate of 10522, this is 10521.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 906
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Postby *Daniel » Mon Dec 12, 2011 1:14 am

imkingdavid wrote:
naderman wrote:Yup I think a dropdown for guest users in the header would make sense in combination with the language in the URL.

I may be able to work on a patch for this in the coming week since it should be fairly simple to do.

Basically do a database query to get all installed language packs, populate the dropdown. Then when the dropdown value is changed append lang to the URL. Would have to be added to append_sid() as well since it would have to remain in the selected language across page changes? Or how would that be handled? Because we can't update the board default language or the guest user default language since that would change it for all guests. Perhaps a new "lang" column on the sessions table?

EDIT: Ticket posted in the tracker.


Wouldn't you be better off put it at the botton of the page? Or that too far?
Oleg wrote:This topic's title takes the prize for most errors per word (3 in 4).
*Daniel
Registered User
 
Posts: 165
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] Override Language via URL

Postby imkingdavid » Mon Dec 12, 2011 1:41 am

*Daniel wrote:Wouldn't you be better off put it at the botton of the page? Or that too far?

I think header would be better. From my experience, foreign websites that allow easy guest language switching have it in the header.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 906
Joined: Thu Jul 30, 2009 12:06 pm

Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: imkingdavid and 10 guests