Table of Contents


Custom Labels Overview

Custom Labels are custom text values that can be used in Active Pages and Classes. The values can be translated into different languages using Magentrix Translation Studio. Custom Labels enable developers to create multilingual applications which show help text, messages, titles, and more in the end-user's native language. A Custom Label can be up to 2,000 characters in length.

To add a Custom Label, use the following steps:

  1. Create a new Custom Label by going to Setup > Develop > Labels.
  2. Translate your Custom Labels using the Translation Studio by going to Setup > Manage > Language Settings.
  3. Add the the label using the methods described below.

 

Including Custom Labels in Active Pages

<%:CustomLabels.My_Label%>

 

Including Custom Labels in Active Classes

public ActionResponse MyAction(Account model)
{
    try
    {
        Create(model);
    }
    catch (DatabaseException ex)
    {
        UpdateModelState(ex);
        return View(model);
    }

    AspxPage.AddMessage(CustomLabels.Save_Operation_Successful);

    return View(model);
}