views:

9

answers:

0

I have an ASP.Net webforms application that uses the .Net globalization features to deliver .aspx pages in different locales. I have custom errors defined as

 <customErrors mode="RemoteOnly" defaultRedirect="Error.htm">

I prefer using a non-.Net page for the defaultRedirect to prevent the potential for infinite loops, in case the error page itself generates an error, so I have targeted a static .htm page. However, I would like to render that page in the locale that the user originally requested, where the locale is determined from a querystring.

What is the best way to accomplish this?

I have considered these options, but I am interested in other options:

  • Redirect to some other app/domain that can run server-side logic to redirect to or render a locale-specific response (seems like overkill)
  • Use client-side code (JavaScript) to render locale-specific content (doesn't work for JavaScript-disabled browsers, though, and I would like it to work for these users too)
  • Make the static error page display text in multiple languages--show all language text on one page (I prefer to only show text in one locale, though)