I use pe:documentViewer for display documents and set 'locale' like pt
( pt_pt
, pt_br
, pt-pt
or pt-br
) but nothing happens and the actions continues in english. why?
My code is:
<pe:documentViewer locale="pt" height="#{previewHeight}" value="#{previewComponent.file}"/>
Solve by changing the locale javascript as it is a bug Primefaces Extension will not find the pt-BR,pt-PT:
<pe:documentViewer value="#{document}" locale="pt" height="800"/>
<script type="text/javascript">
var src = document.getElementsByTagName("iframe")[0].src.replace('#locale=pt','#locale=pt-BR');
document.getElementsByTagName("iframe")[0].setAttribute('src', src);
</script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.