Re: ASP.NET Internationalization bug?



Hi, Lee.

re:
!> <html runat="server" xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-US" lang="en-US" dir="ltr">
!> no xml:lang attribute is rendered to the browser!
!> Remove the runat="server", and, voila, the xml:lang attribute is rendered.

Try this :

<html xmlns="http://www.w3.org/1999/xhtml"; runat="server" id="someID">

<script runat="server">
someID.Attributes("xml:lang") = "en-US"
</script>



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================

"Lee C." <nomail@xxxxxxxx> wrote in message news:O%23KsAQA2IHA.4572@xxxxxxxxxxxxxxxxxxxxxxx
I think I have discovered a bug in ASP.NET, related to I18N.

In ASP.NET 3.5 I have to set runat="server" on the html element to use explicit expressions. It appears that ASP.NET
eats the xml:lang attribute on the html element when it is set to runat="server".

Of course I want to replace the hardcoded "en-US" values with (resource) explicit expressions; but, for simplicity,
try this:

<html runat="server" xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-US" lang="en-US" dir="ltr">

...And you will find that no xml:lang attribute is rendered to the browser! Remove the runat="server", and, voila, the
xml:lang attribute is rendered. :[

...Any ideas?

Cordially,
Lee





.



Relevant Pages

  • Re: Simple question ??
    ... A web page is basically an HTML document. ... a technology that, at the most basic level, delivers HTML to a web browser. ... Internet Explorer, for example, can display Word documents, ... file format to a browser in its native state. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Toward WYSIWYG Web Page Authoring
    ... HTML and the web browser, ... Of course, even at the time of the first GUIs for developing HTML, WYSIWYG ... The best answer has emerged in the form of XML. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Mulberry gone, now what?
    ... > browsers is about reading broken HTML. ... It's easier for a browser to be backwards ... bear on web developers ("My son at college says the page looks different ...
    (comp.mail.imap)
  • Re: Toward WYSIWYG Web Page Authoring
    ... >> WYSIWYG Web page development capability on the Web - ever? ... > HTML and the web browser, ... > browser being the only web browser in existence at the time. ... The best answer has emerged in the form of XML. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Toward WYSIWYG Web Page Authoring
    ... >> HTML and the web browser, ... >> browser being the only web browser in existence at the time. ... >> WYSIWYG was already an impossible goal. ... The best answer has emerged in the form of XML. ...
    (microsoft.public.dotnet.framework.aspnet)