Change text direction for all pages

I am working on a web project, which may be in several langauges, I have done all this, I still have one thing.

pages when shown in English, from left to right.

some languages ​​on my site should be from right to left

Please note that my question is about the whole page, not the text in the fields.

How can i do this?

I use this code to run threads for many languages.

Thread.CurrentThread.CurrentCulture = new CultureInfo(CultureName); Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; 

I do not know what I think the previous code may be useful to achieve my goal.

+6
source share
2 answers
 bool Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft 

See an example: http://afana.me/category/Website-Optimization.aspx?page=2

To flip the whole page, use HTML tag tags

 <body dir="rtl" align="right"> 

or CSS properties in the body tag

 direction:rtl; text-align:right; 

The direction is BiDi control for the script language. Alignment is used to control the alignment of the visual display.

+5
source

I found this, hope this helps:

http://fortysevenmedia.com/blog/archives/styling_right-to-left_text_with_css_on_a_multi-lingual_site/

... and the site they made:

http://musicthoughts.com/

try the links to the language below.

They use the dir = "rtl" attribute with some other minor changes to their css.

0
source

Source: https://habr.com/ru/post/957853/


All Articles