Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Right to left in Asp.net

  • 06-10-2005 1:57pm
    #1
    Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭


    The project I'm currently working on will have to support right to left languages like Arabic, I am setting the Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture but that isn't changing the controls to right to left. I'm setting this programmatically for each control which is an effort to say the least.

    Is there a way of setting right to left orientation without having to programmatically set the attribute on each control/element through code?

    Anybody got a good resource for this work besides the standard msdn stuff?


Comments

  • Registered Users, Registered Users 2 Posts: 131 ✭✭theexis


    What is your expectation for the UI? Given you're in ASP.NET its the thread locale of the client browser thats important. There are 2 ways to support RTL, mirroring and flipping; I don't believe mirroring is supported in a platform independant way in the HTML standard so you have to flip each control as you have done manually.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    We pick up locale from the client, if its not supported we default to English, however the language can be changed manualy by the user. Yeah, it looks like I am going to have to do each control manually.


  • Registered Users, Registered Users 2 Posts: 6,762 ✭✭✭WizZard


    This should do it for you.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    That's pretty much what I'm doing Wizzard, just setting the attribute programatically - seems a bit sloppy though so I hoped I was missing something.

    <edit>
    I've just spoken to our localisation dude in the states and apparently standard asp.net controls will do it automatically - need to go digging I think. I'll post my results anyway.


  • Registered Users, Registered Users 2 Posts: 6,762 ✭✭✭WizZard


    It's a while since I looked at anything like that I'm afraid.

    Maybe derive all your controls from a custom control and get it to read that setting from your system. Then the control would do it itself without any help from you?


  • Advertisement
Advertisement