在阿拉伯语的struts2国际化中,如何将文本框中的光标自动更改为rtl? [英] In struts2 internationalization in Arabic how to automatically change cursor in textboxes to rtl?

查看:25
本文介绍了在阿拉伯语的struts2国际化中,如何将文本框中的光标自动更改为rtl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的 Struts2 应用程序中实现了国际化,它工作正常,但是当我选择阿拉伯语作为语言时,如何将所有 jsp 中所有文本框中的光标位置自动更改为 RTL?

I have implemented internationalization in my Struts2 application and it is working fine, but how do I change the cursor position automatically in all the textboxes in all the jsp to RTL when I select Arabic as the language?

如果你能给我一个简单的例子,那将非常有帮助.

If you could give me a simple example it would be very helpful.

推荐答案

在JSP-s的标签中添加dir属性如何,使用Struts2<s:if> 标签来检查当前的语言环境:

How about adding dir attribute to the <html> tag in JSP-s, using Struts2 <s:if> tag to check current locale language:

<html <s:if test="locale.language == 'ar'">dir="rtl"</s:if> >
  ...
</html>

这篇关于在阿拉伯语的struts2国际化中,如何将文本框中的光标自动更改为rtl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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