Localization

<< Click to Display Table of Contents >>

Navigation:  Tasks > Change GUI >

Localization

1) Localize the actions, hints and captions

 

Use the command

 str :=  WPViewPDF1.CommandGetStr(COMPDF_ACTION_READ, 'xml', 0 );

 

to read the action XML script. (You can use nthe PDFEdit.EXE, Menu "Info" to do this)

 

This will create XML code similar to

 

<?xml version="1.0" encoding="windows-1252"?>

<infomenu>

<menu1 text="Document Summary"></menu1>

<menu2 text="Security Information"></menu2>

<menu3 text="Modification Rights"></menu3>

<menu4 text="Font Information"></menu4>

<menu5 text="Viewer Options"></menu5>

<menu6 text="About Viewer"></menu6>

<menu7 text="Edit Options"></menu7>

<menu8 text="Printer Setup"></menu8>

<menu9 text="Print..."></menu9>

</infomenu>

<kinds><kind0 text ....

 

 

Save to a file and change the language in that XML data.

 

When your program starts load the changed data back before the GUI is created.

 

To load it back use the command

 

COMPDF_ACTION_WRITE

 

 

2) Localize the "?" menu texts:

 

clip0009

 

the displayed strings can be controlled with this commands:

 

COMPDF_SetDocumentProperties

COMPDF_SetPrintSetup

COMPDF_SetPrint

COMPDF_SetShowAbout

 

Example:

 

VCL

WPViewPDF1.CommandStr(COMPDF_SetDocumentProperties, 'Eigenschaften')

 

NET

pdfViewer1.Command(commands.COMPDF_SetDocumentProperties, "Eigenschaften");

 

 

 

Activate the hints:

 

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'1', pdf_hint_ONOFF);

 

The hints for the zoom panel can be localized with this code:

 

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'bookmarks', pdf_hint_LeftPanel);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'bookmarks', pdf_hint_LeftPanel);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'100%', pdf_hint_Zoom100);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'zoom in', pdf_hint_ZoomIn);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'zoom out', pdf_hint_ZoomOut);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'page width', pdf_hint_ZoomWidth);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'full page', pdf_hint_ZoomPage);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'two pages', pdf_hint_ZoomTwoPages);

 WPViewPDF1.CommandStrEx(COMPDF_SetShowHint,'thumbnails', pdf_hint_ZoomThumbnails);