Text direction
Last modified: 26 August 2021
Required plugins: Resource Bundle Editor
IntelliJ IDEA enables you to choose the base direction for rendering strings and tokens (for example, in properties files), containing bidirectional text, like a mix of English and Hebrew or Arabic.
Choose the direction for rendering bidirectional strings
On the View menu, point to BiDi Text Direction and select the required direction:
By default, the direction for rendering is content-based, which means that text direction is defined by the text with which the string begins. For example, if the string starts with English, then the base direction of text is considered left-to-right.
However, it is also possible to always use either left-to-right or right-to-left as the base direction.
Depending on the selection, bidirectional string literals change their appearance:
文字方向
最后修改:2021 年 8 月 26 日
所需插件:资源包编辑器
IntelliJ IDEA 使您能够选择呈现字符串和标记的基本方向(例如,在属性文件中),其中包含双向文本,例如英语和希伯来语或阿拉伯语的混合。
选择渲染双向字符串的方向
在视图菜单上,指向双向文本方向并选择所需的方向:
默认情况下,渲染方向是基于内容的,这意味着文本方向由字符串开头的文本定义。例如,如果字符串以英文开头,则文本的基本方向被认为是从左到右。
但是,也可以始终使用从左到右或从右到左作为基本方向。
根据选择,双向字符串文字会改变它们的外观: