- Fresh install of Drupal 6.0RC1 in english
- Configure language : "Path prefix with language fallback"
- Add language. In my case partial french traduction for Drupal 6.0 RC1
- Administration instantly switches to french
- Add language switcher in a block
- Click on "English"
- No switch - Stays in French
- Delete French language is the only option to get back to english

Comments

gábor hojtsy’s picture

Category: bug » support
Status: Active » Fixed

You did not set up a path prefix for English, and you have a default French language setup from the steps above, so you cannot access English with any path prefix. Add a path prefix for English.

Read and comment on http://drupal.org/node/146084 which is closely related.

ouranos’s picture

Ok. Don't understand why French became the default langage though. Seemed to me this property was defined in the Locale module with the radio buttons. I thought french was the "active" language from the steps above, not "default".

Like somme others contributors, i think the documentation about languages could be improved, especially for Drupal new users. Documentation is clear about adding langage and translate interface and content, but not so clear about default langages, priorities, and switching.

Really thrilled by the new multi-languages features in Drupal yet ... Great work.

gábor hojtsy’s picture

After you add French, the administration only switches to French, if you make French the dafault language as well. Otherwise you can add and import as many languages as you want, and the administration page will not switch to those languages. So you made French the default (or there is a bug if someone can reproduce).

ouranos’s picture

After you add French, the administration only switches to French, if you make French the default language as well.

Ok. If i get it well, it's the fact that i set up "path prefix with langage fallback" before importing French. French was not the default, user preference was "english", but Drupal relied on the browser language to switch to French immediately. That's it ?
So here is the source of confusion : in the above situation, French is active, English is default and according to the doc i don't need to set up a prefix for default language. But without the prefix, Drupal doesn't switch to english.
All is ok when i add the prefix for english.

gábor hojtsy’s picture

Oh, right, sorry, I was wrong in saying you had French by default on the site. Your browser has a French preference, and you choose the language fallback mode. Because there was no language code in the URL, the fallback considered your browser preference and used French.

This is the help for the mode you use:

Path prefix with language fallback. The presentation language is determined by examining the path for a language code or other custom string that matches the path prefix (if any) specified for each language. If a suitable prefix is not identified, the display language is determined by the user's language preferences from the My Account page, or by the browser's language settings. If a presentation language cannot be determined, the default language is used.

In this mode, languages without path prefixes are not accessible by the path, because the case 'we have no path' is reserved for the automated checking, which only goes back to the default language if nothing else is identifiable, as the text explains.

ouranos’s picture

Ok. Thanks for your explanations. I had read the help on the configure langage tab, of course.

Just to be sure, if :

Fallback mode, english default, no prefix for english, french browser,

http://www.mysite.org/drupal/fr/admin --> french

http://www.mysite.org/drupal/admin --> french (english default no accessible by default path)

gábor hojtsy’s picture

Yes, this is what happens exactly.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.