Firefox PHP

Control language choice via URL? e.g., &uselang=en

Posted by jidanni 
Control language choice via URL? e.g., &uselang=en
January 05, 2011 07:48PM
Dear Sirs,
Assume I am a mere user, not even logged in either.
With MediaWiki, I can add &uselang=en to make much of the boilerplate of
a page into English. Compare
[radioscanningtw.jidanni.org]
[radioscanningtw.jidanni.org]

OK, what do I do to e.g.,
[www.bdsm.com.tw]
to get the same effect?
Note I don't expect actual content to become English, just the boilerplate.
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 03:50AM
I am afraid that there is no feature in Phorum that supports setting the language via the URL. It could perfectly well be implemented through a module I think (pick up the URL argument and either create a cookie to remember the language or modify the URL generation behavior to include the language in each built URL), but I've never seen such module either.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 04:12AM
You see I wanted to help my English speaking friend post a message on
that site, but right from the start these is no way to make the phorum
sign up page also in English -- even supposing he makes it to some
settings page that allows him to permanently use English mode.

Compare e.g., [www.couchsurfing.org] which has the language
selector available from Page 1. Food for thought for your future versions.
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 05:09AM
Fact is that almost all Phorum installations make use of only one language, which does not make a globally available language selector for anonymous users a very likely option for a future version.

A language selector like that is not hard to build as a module, so if some coder thinks it is useful too and wants to spend time on creating the language selector, then there might be some module-based solution in the future.

Isn't there an option for you to register an account for your friend and switch it to English in the control center for that account? (assuming that the admin of the site allows switching the language)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 09:15AM
If you are able to code your own module, you could take a look at the work I did on my Drupal plugin for my External Authentication module. There I tied the Phorum language to the Drupal language using Drupal's query based language indicator (eg www.mysite.com/en/forum would be in English and www.mysite.com/de/forum would be in German).

If I didn't have two projects falling far behind and very little free time to code, I would consider making that code a separate module, but I'm afraid there is little hope of that in the next couple of months. Sorry.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 12:37PM
I get the idea that this site is not owned by jidanni, so writing a module probably wouldn't help here. Maybe I'm wrong, but he uses wording like "that site" instead of "my site".


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 03:44PM
Indeed, not my site. Anyway, idea: the English strings can't be all that large, so always have them available for debugging at least. E.g., that way you phorum pros could easily navigate any phorum site without encountering a barrier. E.g., you could go in to the above site and poke around to see what capabilities he has enabled. This might be accomplished by a button in the footer "[English]", that sets a cookie... too ugly.

Anyways, in a nutshell: how ghastly, a single language program that didn't have to be that way, as you already have done the hard work of translating. And those strings can't be so large compared to even a few discussions on a phorum. So don't leave it up to an administrator to choose what to allow. Do like MediaWiki -- all languages available, from Page 1!
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 03:50PM
Plus, find me one phorum where everybody is comfortable with just one language. The above Traditional Chinese phorum is getting more and more Simplified Chinese users. Etc. Etc. Sure, a pro administrator can hack back out some language if he so insists, but by default have all languages there for the user to select, and don't give the administrator a way to turn them off, unless he can hack them off himself under the hood.
Re: Control language choice via URL? e.g., &uselang=en
January 06, 2011 04:47PM
That's a simple one: [www.gitaar.net]

I can assure you that everybody is comfortable with the Dutch that is spoken there. If there are people who would like to use the site in English or any other language, then that's too bad for them. They should go to a forum that meets their language needs.

For testing people's Phorum sites, I have seen many languages and never had troubles finding my way around. Most admin's don't create a fully customized template, putting all options in default places. Furthermore, it's easy to look at the URLs to find out what link to click. I understand your idea, but I have never felt limited when checking out other people's Phorum sites.

We are not saying that it's a bad option, but none of the current developers ever really saw the need for the option that you seem to desire so much or did want to spend time on creating the code for it. When there is a developer who wants to write the code (and as always with Phorum: optimally through a module), then that is fine and certainly possible.

Your idea of forcing features onto administrators to match your view of a perfect system is a bad option though. Or put better: it is not at all in line with the Phorum philosophy.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login