在 UIWebview 中渲染希伯来语文本时出现问题
我在数据库中存储了一些希伯来语文本。当我获取&应用一些 css(设置页面的背景颜色和边距)后在 UIWebview 中渲染它,文本显示得很好,但问题是,如果我在 webview 中右对齐内容,那么希伯来语内容会右对齐,但实际上它不是它应该是这样的。我的意思是 RTL 文本应该显示的方式。 句号出现在文本的右侧,如下图所示。我知道右对齐文本不会以 RTL 文本应有的方式显示它
它不是 重复 并且我有完成了那里提到的步骤,但仍然没有成功。
我希望有人可以帮助我以正确的方式显示文本。如果需要,我可以添加 CSS 片段。如果需要任何支持代码或图片,请评论
I have some hebrew text stored in database. When I fetch & render it in UIWebview after applying some css (setting the background color and margin for the page) the text comes up fine but the problem is that If I right align the content in webview then the Hebrew content gets right aligned but actually it is not the way it is supposed to be. I mean the way RTL text should have shown. The Full stop appears on the right hand side of the text as shown in image below. I know that right aligning the text will not show it the way RTL text should be
Its not a duplicate and I have gone through the steps mentioned there but still no go.
I hope if someone can help me to shown the text in correct way . I can add the CSS snippet if required. Please comment if any supporting code or image is required
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该在 CSS 中设置
direction: rtl
或在 HTML 中添加dir="rtl"
属性。如果您要将此文本嵌入到混合语言段落中,您可能还需要修改
unicode-bidi
CSS 属性。You should either set
direction: rtl
in the CSS or add adir="rtl"
attribute in the HTML.You may also need to fiddle with the
unicode-bidi
CSS attribute as well if you're embedding this text into a mixed-language paragraph.你需要在html中指定dir =“rtl”然后你将从右到左获取数据
示例:
u need to specify dir="rtl" in html then you will get the data from right to left
Example: