Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stipo 11 posts 31 karma points
    Oct 20, 2010 @ 00:47
    Stipo
    0

    Read Text from Language File

    Hi,

    I have an new Section to Umbraco. That works perfectly, but i have an question to language file.

    How can read any Content from this, and add at the CodeBehind to an Control as Text.

    I have add a new TreeAlias Key at the Sections.

    <area alias="mySection">
          <key alias="newKey">[!CDATA[New Text]]></key>
    </area>

    Hope, understand my english and my question. But not, you can response with any questions.

    Greets
    Stephan

  • Stipo 11 posts 31 karma points
    Oct 21, 2010 @ 22:32
    Stipo
    0

    I  hase the Answer found.

    At the CodeBehind, must insert follow Code:

            protected override void OnInit(EventArgs e)
            {
                MenuImageButton menuSave = UmbracoPanel1.Menu.NewImageButton();
                menuSave.ID = UmbracoPanel1.ID + "_save";
                menuSave.ImageUrl = "/umbraco/images/editor/save.gif";
                menuSave.Click += new ImageClickEventHandler(menuSave_Click);
                menuSave.AltText = ui.Text("buttons""save"null);
                base.OnInit(e);
            }

    With the Umbraco.ui.Text - Methode, can read from XML Language file.

    I hope this can help others.

Please Sign in or register to post replies

Write your reply to:

Draft