I am localizing my web site in three languages.I have managed host names for it. For handling Errors, I have added error page, I want to display that error page according to selected culture
I think you should take a look in the file called umbracoSettings.config. The file is located in the folder called config.
When you have found this one search in the file for <errors> then you should find this section in the file
<errors> <!-- the id of the page that should be shown if the page is not found --> <!--<error404> <errorPage culture="default">1</errorPage> <errorPage culture="en-US">200</errorPage> </error404>--> <error404>1</error404> </errors>
I have taking the code from a clean installation of Umbraco 6.0.3, som my error page id is set to 1, but you have to switch the id of 1 out with the id of your error page and in your case you also should use the culture="".
Thanks for reply. Code is working and links are useful.
but i would like to do little bit modification in code
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<error404 culture="default">1</error404>
<error404 culture="en-US">2</error404>
<error404 culture="de-DE">3</error404>
</errors>
By using above code I am able to display localized 404ErrorPage as per selected language but I cant localized ErroPage
Eg : If u have any login functionality just try to enter Username as </html> Its giving error , I have handled that error page. I have login field and localization option on single page only. After choosing English language it is displaying error message in danish lang only.(Default language is danish language.)
display error page as per culture
Hi all,
I am localizing my web site in three languages.I have managed host names for it. For handling Errors, I have added error page, I want to display that error page according to selected culture
I have added that in we.config
Using umbraco version 6.0
Handling 404's in Umbraco is done with NotFoundHandlers.
Some more information can be found here :
http://our.umbraco.org/wiki/install-and-setup/configuring-404-pages
http://our.umbraco.org/wiki/reference/files-and-folders/files-in-the-config-folder/404handlersconfig
http://our.umbraco.org/wiki/how-tos/how-to-implement-your-own-404-handler
For multi site environments you can use http://ucomponents.codeplex.com/wikipage?title=MultiSitePageNotFoundHandler
Dave
Hi Leena,
I think you should take a look in the file called umbracoSettings.config. The file is located in the folder called config.
When you have found this one search in the file for <errors> then you should find this section in the file
I have taking the code from a clean installation of Umbraco 6.0.3, som my error page id is set to 1, but you have to switch the id of 1 out with the id of your error page and in your case you also should use the culture="".
I hope the example above can help you further.
/Dennis
You also need to set this in your web.config
<httpErrors existingResponse="PassThrough" />
Hi Dennis and Dave,
Thanks for reply. Code is working and links are useful.
but i would like to do little bit modification in code
- Leena
Hi Dennis and Dave,,
By using above code I am able to display localized 404ErrorPage as per selected language but I cant localized ErroPage
Eg : If u have any login functionality just try to enter Username as </html> Its giving error , I have handled that error page. I have login field and localization option on single page only. After choosing English language it is displaying error message in danish lang only.(Default language is danish language.)
How to do that?
Are you got any solution for this problem?
I've written a blog post that explains (with code examples) how to create a custom
IContentFinder
to do this automatically:https://www.diplo.co.uk/blog/web-development/404-page-finder-for-multi-site-umbraco-installations/
is working on a reply...