There are currently some problems with the issue of accessing the front page. When you access the site's root URL (i.e. $_GET['q'] is empty), you should be redirected to $lang. When you access $lang directly, no redirection needs to take place.
Attached patch fixes i18n.module and makes the front page access behave as it should.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | i18n_1.36.2.11_no_language_redirect.patch | 1.11 KB | g10 |
| i18n_fix_front_page_redirect.patch | 1.27 KB | Jaza |
Comments
Comment #1
g10 commentedso, original behaviour of the redirects is:
mysite.com > mysite.com :: default language (en) - no redirect
mysite.com > mysite.com/fr :: non-default language (fr) - redirect
with this patch it changes in:
mysite.com > mysite.com/en :: default language (en) - redirect
mysite.com > mysite.com/fr :: non-default language (fr) - redirect
in case you wish for (no redirections):
mysite.com > mysite.com :: default language (en) - no redirect - en frontpage
mysite.com > mysite.com :: non-default language (fr) - no redirect - fr frontpage
so basicly, first time visitor gets site in default language, but when they have been browsing in other language and go back to the base_path (root URL of site), then they get the frontpage in the other language without redirect
when you want to redirect eg. mysite.com/fr/home to mysite.com/#/fr/home — and don't want to have mysite.com/fr#/fr/home from the i18n module
(use case: Flash/Flex + SWFAddress)
Comment #2
g10 commentedand the patch for convenience
in fact, this should be turned into an option, so people can choose the preferred behaviour
either add language prefix for every language, or no language prefix at all
Comment #3
TBarregren commentedI have added this to the #227550: Patch bundle.
Comment #4
jose reyero commentedOnly critical issues for 5.x