3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1074 Views |
-
404 for multilanugage problem

20 January 2010 at 2:17am
hello
i have 3 languages site EN,PL and DE
and in CMS 404 error page for each languagehere are the names of this pages:
EN - page-not-found
PL - nie-znaleziono-strony
DE - seite-nicht-gefundenbut i always get EN 404 error page, no matter if i am on english,polish or german version
also in source of error_page i have
<% if Locale == "en_US" %>
<% include ikony_en %>
<% end_if %><% if Locale == "de_DE" %>
<% include ikony_de %>
<% end_if %><% if Locale == "pl_PL" %>
<% include ikony_pl %>
<% end_if %>but it doesnt work too
what is the reason ?
-
Re: 404 for multilanugage problem

20 January 2010 at 10:10am
Hi!
I think that’s an old bug with 2.3 series, but I’ve not found it on Trac. Maybe you could submit one.
Regards,
Juan -
Re: 404 for multilanugage problem

25 January 2010 at 1:14pm
The problem is that we don't have enough information in the URL to determine which language to show the 404 page in.
As of 2.4 alpha1, this works:http://mysite/unknown-page // shows in english (assuming its the default locale)
http://mysite/unknown-page?locale=de_DE // shows in germanOf course, you can't rely on visitors setting the right locale when accessing pages.
There's no built-in way support for getting a locale from different TLDs (mysite.de, mysite.com, etc),
or from pseudo sub-urls (mysite.com/de/unknown-page), which would provide this information.
This is a known limitation, see http://open.silverstripe.org/ticket/3877Another approach would be to inspect the "Accept" language in HTTP headers in Page_Controller->init()
and redirect appropriately.If anybody wants to attempt a core patch for this, submissions are welcome
Pointers: ModelAsController->getNestedController(), Translatable->contentcontrollerInit(), ErrorPage::response_for()
| 1074 Views | ||
|
Page:
1
|
Go to Top |


