更改文本方向所有页面 [英] Change text direction for all pages

查看:132
本文介绍了更改文本方向所有页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Web项目,可以在多汉语语言,我已经做了这一切,我还有一件事。

页面时的英语节目是由左到右。

一些语言在我的网站需要由右至左

请注意,我的问题是关于整个页面没有字段中的文本。

如何能做到这一点吗?

我用这code发动线程许多语言。

  Thread.CurrentThread.CurrentCulture =新的CultureInfo(CultureName);
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;

我不知道我的想法是,previous code可帮助以实现我的目标。


解决方案

 布尔Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft

请参阅为例: http://afana.me/category/Website- Optimization.aspx?页= 2

要翻转整个页面或者使用HTML标签的属性。

 <车身DIR =RTLALIGN =右>

或body标签的CSS属性

 方向:RTL;文本对齐:权利;

方向是控制的BiDi的语言脚本。
ALIGN用于控制视觉显示对准

I am working on a web project that can be in multi langauges, i have done all of that, i still have one thing.

the pages when shows in english is from left to right.

some languages on my website needs to be from right to left

Note please, my question is about the whole page not the text in fields.

how can i do that please?

I am using this code for launching threads for many languages.

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

I don't know what i think that the previous code could be helpful in order to achieve my goal.

解决方案

bool Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft

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

To flip the whole page use either HTML tag attributes

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

or CSS properties on body tag

direction:rtl; text-align:right;

Direction is to control BiDi for the language script. Align is used to control visual display alignment.

这篇关于更改文本方向所有页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆