DocumentViewer dashboard add-in extensions not working

I use pe: documentViewer to display documents and set "locale" to pt ( pt_pt , pt_br , pt-pt or pt-br ), but nothing happens and the actions continue in English. why?

My code is:

 <pe:documentViewer locale="pt" height="#{previewHeight}" value="#{previewComponent.file}"/> 
+6
source share
1 answer

Decide by changing the JavaScript locale language as this is a bug. Decryption Primfaces will not find pt-BR, pt-PT:

 &lt;pe:documentViewer value="#{document}" locale="pt" height="800"/&gt; &lt;script type="text/javascript"&gt; var src = document.getElementsByTagName("iframe")[0].src.replace('#locale=pt','#locale=pt-BR'); document.getElementsByTagName("iframe")[0].setAttribute('src', src); &lt;/script&gt; 
+1
source

Source: https://habr.com/ru/post/984319/


All Articles