Primefaces 键盘语言支持
Primefaces keyboard language support
我想将 Primefaces < p:keyboard >
集成到我的应用程序中,但我需要根据用户区域设置加载不同的布局。
现在,键盘组件有一个名为 lang
的属性,我希望它能完全满足我的需要,但从组件文档来看它似乎不是用于此目的:"Code describing the language used in the generated markup for this component"
。
我的下一个方法是创建一个 layout="custom"
并根据用户语言提供适当的 layoutTemplate
。例如,如果语言是 de,我添加了适当的德语字母,但在按钮的情况下,它们仍然保留为英语。例如:
<p:keyboard id="testDe" layout="custom" layoutTemplate="1-2-3-4-5-6-7-8-9-0-ß-space-close"</p:keyboard>
来自 layoutTemplate
的 close
单词是预定义关键字,将为键盘生成关闭按钮。
我的问题是:有没有办法对键盘使用本地化?谢谢。
尝试使用逗号(,)逗号表示换行
这个
<p:keyboard id="testDe" layout="custom" layoutTemplate="1-2-3-4-5-6-7-8-9-0-ß-space-close"</p:keyboard>
到
<p:keyboard layout="custom" layoutTemplate="123,456,789,0ßspace,close"/>
我使用了上面的土耳其示例,但没有使用 layoutTemplate。我刚刚使用了标签:
keypadOnly = "true"
backspaceLabel = "Voltar"
closeLabel = "Fechar"
clearLabel = "Limpar"
我的语言 (pt_BR)。谢谢 Ilkay GÜNEL。 http://kod5.org/primefaces-keyboard-bilesenini-ozellestirme/
我想将 Primefaces < p:keyboard >
集成到我的应用程序中,但我需要根据用户区域设置加载不同的布局。
现在,键盘组件有一个名为 lang
的属性,我希望它能完全满足我的需要,但从组件文档来看它似乎不是用于此目的:"Code describing the language used in the generated markup for this component"
。
我的下一个方法是创建一个 layout="custom"
并根据用户语言提供适当的 layoutTemplate
。例如,如果语言是 de,我添加了适当的德语字母,但在按钮的情况下,它们仍然保留为英语。例如:
<p:keyboard id="testDe" layout="custom" layoutTemplate="1-2-3-4-5-6-7-8-9-0-ß-space-close"</p:keyboard>
来自 layoutTemplate
的 close
单词是预定义关键字,将为键盘生成关闭按钮。
我的问题是:有没有办法对键盘使用本地化?谢谢。
尝试使用逗号(,)逗号表示换行
这个
<p:keyboard id="testDe" layout="custom" layoutTemplate="1-2-3-4-5-6-7-8-9-0-ß-space-close"</p:keyboard>
到
<p:keyboard layout="custom" layoutTemplate="123,456,789,0ßspace,close"/>
我使用了上面的土耳其示例,但没有使用 layoutTemplate。我刚刚使用了标签:
keypadOnly = "true"
backspaceLabel = "Voltar"
closeLabel = "Fechar"
clearLabel = "Limpar"
我的语言 (pt_BR)。谢谢 Ilkay GÜNEL。 http://kod5.org/primefaces-keyboard-bilesenini-ozellestirme/