[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.
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

[RFC] Override Language via URL

Post by imkingdavid »

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
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Override Language via URL

Post by callumacrae »

+1

Would be nice to see in 3.1, it would be pretty easy to implement.
Made by developers, for developers!
My blog

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Override Language via URL

Post by Oleg »

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).

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Post by imkingdavid »

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

Re: [RFC] Override Language via URL

Post by naderman »

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

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Post by imkingdavid »

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.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Override Language via URL

Post by Oleg »

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

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Post by imkingdavid »

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.

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] Override Language via URL

Post by Danielx64 »

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?

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Override Language via URL

Post by imkingdavid »

*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.

Post Reply