language in the URL

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
webmusic
Registered User
Posts: 5
Joined: Sun Aug 21, 2005 11:33 pm

language in the URL

Post by webmusic » Sat Dec 26, 2009 8:59 pm

How does one call a language to start the board in from the URL?

Such as:

forum.com/index.php?lang=fr

What is the proper way to do this?
Not sure what query to use.....

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51726
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: language in the URL

Post by Brf » Sat Dec 26, 2009 9:12 pm

You dont. You would choose the language in your UCP.

benbogart
Registered User
Posts: 9
Joined: Tue Jan 05, 2010 6:57 pm

Re: language in the URL

Post by benbogart » Tue Jan 05, 2010 7:04 pm

I just added one line of code to includes/session.php.

Right before

Code: Select all

		$lang = &$this->lang;
in the function setup I added

Code: Select all

if(isset($_GET['lang'])) $this->lang_name = $_GET['lang'];
then you specify the language with lang=en in the url exactly as you requested.

I'm not saying its the "right" way to do it but it works.

Locked

Return to “[3.0.x] Support Forum”