The document viewer has about 111 language files, however for some few custom text which are not inside those language files, this property is used to override. For example, you can override the default "preparing document..." message for localization purpose.
public Dictionary<string, Dictionary<string, string>> Translations { get; set; }
Public Property Translations As Dictionary(Of String, Dictionary(Of String, String))
Get
Set
documentViewer.Translations = new()
{
{
"en",
new()
{
{ "preparing-document", "Preparing document..." },
{ "cover-sheet", "Cover Sheet" },
{ "rotation-mode", "Rotation Mode" },
{ "rotation-mode-title", "Rotation Mode (rotate current page or all pages)" },
{ "full-screen", "Full Screen" },
{ "download-original", "Download Original" },
{ "any-word", "Any Word" }
}
},
{
"de",
new()
{
{ "any-word", "Jedes Wort" }
}
}
};
documentViewer.Translations = New Dictionary(Of String, Dictionary(Of String, String))() From {
{
"en",
New Dictionary(Of String, String)() From {
{"preparing-document", "Preparing document..."},
{"cover-sheet", "Cover Sheet"},
{"rotation-mode", "Rotation Mode"},
{"rotation-mode-title", "Rotation Mode (rotate current page or all pages)"},
{"full-screen", "Full Screen"},
{"download-original", "Download Original"},
{"any-word", "Any Word"}
}
},
{
"de",
New Dictionary(Of String, String)() From {
{"any-word", "Jedes Wort"}
}
}
}