Free Support Forum -

Viewer showing titles and labels in english before loading file


I configured the translation of GroupDocs.Annotations passing the attribute ‘localizedStrings’ and ‘thumbsImageBase64Encoded’ to the function ‘groupdocsAnnotation()’ which loads and creates GroupDocs viewer. The piece of code that does it is shown here:

function visualizarDocumentoAnotacaoComId(info) {
var annotationWidget = $(’#’ + ID_CONTAINER_VISUALIZADOR).groupdocsAnnotation({
localizedStrings : info.localizedStrings,
thumbsImageBase64Encoded : info.thumbsImageBase64Encoded,
width : 0,
height : 0,

The translation of labels worked fine.

But when I open a PDF, while the file is not loaded, the viewer is shown with english labels and text. Only when the file is loaded (the first page) the viewer labels are changed to my language (portuguese). This takes from less than a second to 2 seconds to happen. I want the viewer shows portuguese labels and text when it is first shown, even then the file is not loaded. How to solve this problem?

I attached 2 images showing the viewer with this conditions.

Hello Rafael,

Thank you for your inquiry.

Could you please specify which exactly GroupDocs library you use, is it Viewer or Annotation? From your post description we can assume that you use Viewer library, but from your js code we can see that it is Annotation library.

Basically, the reason of the issue is that that your js code for change localization performs only when document was loaded, but before this the ViewerHandler( AnnotationHandler) still has default English language .

So I can recommend you to set the localization in an initialization of the AnntationHandler(ViewerHandler) as shown on this screenshot . For how to create LocalizationGE class you can check this sample.

If you will have more questions please feel free to contact us.


Best regards,
Evgen Efimov
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


Hi, Evgen.

I’m using GroupDocs.Annotations with annotations disabled.

I don’t use the AnnotationHandler.getAnnotationScript() method to generate my Javascript code to start the GroupDocs.Annotation jQuery plugin viewer. It is a static Javascript code and I pass some parameters to it; one of them is ‘localizedStrings’ and the other is ‘thumbsImageBase64Encoded’. I created my Language (portuguese) to translate passing parameters to GroupDocs viewer.

But the way you explained, the problem occurs anyway, because this way simply pass the labels and image language values to the Javascript the same way I do statically, except that GroupDocs generate the Javascript code to me. I attached part of the generated Javascript that shows that.

I attached the images of my screen when I used a sample web app provided by GroupDocs that uses the method AnnotationHandler.getAnnotationScript() to generate the Javascript code like you said. It uses the Localization object (russian language) just like you said.

Hello ,

Thank you for coming back.

We have tested the scenario and have managed to reproduce the same issue at our side. We have logged this problem in our issue tracking system as ANNOTATIONJAVA-877. Also we have linked this forum thread to the same issue and you will be notified here once this issue is resolved.

We apologize for the inconvenience.


Best regards,
Evgen Efimov
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+