Last post Sep 22, 2013 06:47 AM by M3ssaf
Apr 17, 2013 05:22 AM|zaidmctaie|LINK
I'm createing a website in asp.net 2010 sp1, the user can choose the language he wants (between English and Arabic).
I created 2 columns in DB and when the user changes the language i will load the text and disply it in Literal control.
I tried to use the localization, the problem I'm curently having is with the
direction of the page, in arabic the direction is from right to left, can anyone tell me how to change the direction of the page (div)?
In English <div style="direction:ltr"></div>
While in arabic <div style="direction:rtl"></div>
How to change the direction using localization?
Apr 17, 2013 05:37 AM|Gaspard|LINK
This thread may help
Apr 17, 2013 09:42 AM|zaidmctaie|LINK
It's not working, seems like for some reason the I can't change the direction from the resourse file,
Apr 22, 2013 04:45 PM|psinet|LINK
What isn't working? The CSS or the resource file?
Sep 22, 2013 06:47 AM|M3ssaf|LINK
well .. it seems to be working with server controls not HTML controls .. , so far i didn't find a way to make it work on HTML controls too..
so what i did is to enclose my table or div with an asp panel..,
<asp:Panel ID="Panel1" runat="server" Direction="<%$ Resources:Main, PageDirection %>"></asp:Panel>
and in your resource file you can set the PageDirection property to RightToLeft
this seems to work at 80 % of the cases i've faced so far ! ..