p:具有响应性回流=“真"的数据表排序语言; [英] p:datatable sort language with responsive reflow = "true"
问题描述
如何通过reflow ="true"更改PF DataTable组件的排序语言(如此响应的Datatable)?
How can I change the language for Sorting on PF DataTable component with reflow = "true" (so responsive Datatable)?
问题在于,在移动屏幕上,我们可以从具有自动排序选项的自动生成的下拉列表中对数据进行排序,请参见下面的图片.如何更改此下拉菜单的语言?
The problem is that on mobile screen, we can sort data from auto-generated dropdown where we have our sort options, see picture bellow. How can I change the language for this dropdown?
我正在使用PF 6.0.
I'm using PF 6.0.
推荐答案
我从没有遇到或使用过它,但是我知道源是开放的.所以我去了this.ascMessage结束了
I never ran into this or used it, but I know the source is open. So I went to the javascript file for the datatable. There I searched for 'Ascending' and via this.ascMessage
, I ended up on line 170 where 'datatable.sort.ASC'
is used as a key.
依次指向在哪里可以看到使用了正常的PrimeFaces语言环境功能.
Where you can see the normal PrimeFaces locale functionality is used.
因此,请使用您的自己的语言环境并覆盖其中的这一部分,例如在默认语言环境
So using your own locale and overriding this part in it, like in the default locale
aria: {
'paginator.PAGE': 'Page {0}',
'calendar.BUTTON': 'Show Calendar',
'datatable.sort.ASC': 'activate to sort column ascending',
'datatable.sort.DESC': 'activate to sort column descending',
'columntoggler.CLOSE': 'Close'
}
我会解决您的问题
这篇关于p:具有响应性回流=“真"的数据表排序语言;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!