ASP.NET and right-to-left and bidirectional languages

  • Thread starter Thread starter Eric Veltman
  • Start date Start date
E

Eric Veltman

Hello everyone,

I've just read something about ASP.NET localization in the Dutch
..NET magazine, but one question I had about it wasn't answered
in the article ...

What do I need to do to make ASP.NET applications support
right-to-left ( Arabic ? ) and bidirectional ( Hebrew ? )
languages ? I guess just localizing the strings isn't enough
as the user interface probably needs to be mirrored as well ??

Best regards,

Eric
 
Eric said:
Hello everyone,

I've just read something about ASP.NET localization in the Dutch
.NET magazine, but one question I had about it wasn't answered
in the article ...

What do I need to do to make ASP.NET applications support
right-to-left ( Arabic ? ) and bidirectional ( Hebrew ? )
languages ? I guess just localizing the strings isn't enough
as the user interface probably needs to be mirrored as well ??

Best regards,

Eric

Just use the <html dir="rtl"> attribute.
See:
http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskdisplayingrighttolefttextusinghtmltags.asp
 
Eric said:
Hello Jos,

vbtskdisplayingrighttolefttextusinghtmltags.asp

Note in Visual Studio .NET, you can set this property
via the WebForm DOCUMENT's "dir" property, which
has a dropdown list of "ltr" and "rtl".

Plus if you use the ID and RUNAT attributes for the HTML tag
<HTML id="htmlID" runat="server" dir="rtl">
with a code-behind generic html control variable
protected System.Web.UI.HtmlControls.HtmlGenericControl htmlID;
you can get or set the "dir" attribute value as follows
string dir = htmlID.Attributes["dir"];
htmlID.Attributes["dir"] = "rtl";

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com
 
Back
Top