Table of Contents

DocumentViewer.Translations Property

Definition

Namespace
GleamTech.DocumentUltimate.AspNet.UI
Assembly
GleamTech.DocumentUltimate.dll

Gets or sets a value that specifies the custom translations for the document viewer.

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; }

Property Value

Dictionary<string, Dictionary<string, string>>

Examples

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"}
        }
    }
}