Custom Labels
Custom Labels are reusable text values defined once and referenced wherever you display copy in the portal — Active Pages, Active Classes, Buttons, Page Layouts, formulas, and notifications. Their primary purpose is localization: each Custom Label has a master value plus translations into every language enabled on your portal, so the platform can render the correct language to each user automatically.
This page covers the administrative work of managing Custom Label records: creating, editing, referencing, and translating them. The Developer Guide covers the same topic from the code side, including how to reference labels from inside the IDE.
Requirements
- Administrator System Role.
- If you intend to translate labels, the target languages must already be enabled in Configuring Language Settings. Magentrix supports a growing set of languages including Spanish (MX) and Portuguese (PT-BR).
Where Custom Labels Live
- Setup > Develop > Labels — the administrative list of every Custom Label in the portal.
- Translation Studio — the workspace for translating each label's master value into other languages. See Using the Translation Studio.
- The IDE — references to Custom Labels appear in Active Pages and Active Classes; the IDE recognizes label syntax and assists with autocomplete. See Labels in the IDE in the Developer Guide.
Custom Label Fields
| Field | What It Is |
|---|
| Short Description | A human-readable name for the label. Used in admin lists. Up to 120 characters. |
| Name | The unique identifier used in code and merge fields. Must start with a letter and contain only letters, digits, and underscores. No spaces or special characters. Cannot end with an underscore or contain two consecutive underscores. Auto-suggested from the Short Description, but can be overridden. Up to 120 characters. |
| Value | The master text. By convention, write this in English; translations are added later via the Translation Studio. Up to 2,000 characters. |
| Comments | Optional internal note explaining the label's purpose. Helpful for translators and other administrators. Up to 255 characters. |
Create a Custom Label
- From the Setup home page, go to Develop > Labels.
- Click New.
- Fill in Short Description. The Name field auto-populates from this; adjust if you want a different unique identifier.
- Fill in Value with the master English text.
- Optionally fill in Comments.
- Click Save.
Once saved, the label is immediately available for reference from anywhere in the portal that supports merge syntax, and it appears in the Translation Studio so translators can add translations.
Reference a Custom Label
The reference syntax depends on where you are using the label.
In merge fields (Buttons, Page Layouts, formulas, automation message bodies):
{!$Label.MyLabelName}
In Active Pages and Active Classes: see Labels in the IDE in the Developer Guide for the full syntax and helper utilities.
When the page renders, the platform substitutes the value from the user's preferred language. If no translation exists for that language, the master Value is used as a fallback.
Edit a Custom Label
- From Setup > Develop > Labels, locate the label.
- Click the row to open it, then click Edit.
- Modify the fields.
- Click Save.
Changing the master Value updates only that field; existing translations in the Translation Studio remain in place. If the meaning of the label has changed enough that translations need to be re-done, edit them in the Translation Studio after updating the Value.
The Name field cannot be changed if the label is referenced anywhere in the portal — renaming would break those references. Plan around the original Name, or create a new label and migrate references.
Translate a Custom Label
Translations are managed in the Translation Studio, not on the label record itself. Open Using the Translation Studio for the full workflow. Briefly:
- Confirm the target language is enabled in Configuring Language Settings.
- Open the Translation Studio and locate the label.
- Add or edit the translated value for each language.
- Save. The translation takes effect on the next page render for users whose preferred language matches.
Delete a Custom Label
- From Setup > Develop > Labels, open the label.
- Click Delete and confirm.
Before deleting, audit references — the platform does not automatically clean up $Label references in Active Pages, Active Classes, Buttons, Page Layouts, or automation messages. A reference to a deleted label renders as the literal merge string at runtime.
Use Cases
- Multilingual portals. A partner portal serving English-, Spanish-, and Portuguese-speaking users displays Button labels, headings, and notification text in each user's language without separate code paths.
- Centralized copy. A single label like WelcomeHeading is referenced from a dozen Active Pages. Updating the master Value once changes every page that uses it.
- Branding adjustments. Custom Labels make it easy to change the wording of platform UI without editing the underlying Active Page or Class — useful when a customer requests a small terminology change.
Troubleshooting Tips
- Label renders as literal merge text. The reference is wrong or the label was deleted. Confirm the Name in the merge field exactly matches the Custom Label's Name (case-sensitive).
- Wrong language displays. Either the target language has no translation for that label (master Value is used as fallback), or the user's preferred language is not what you expect. Confirm the user's language preference and the available translations in the Translation Studio.
- Cannot save Name. The Name field has strict rules: starts with a letter, only letters/digits/underscores, no consecutive underscores, no trailing underscore.
- Spanish (MX) or Portuguese (PT-BR) translations don't appear. Confirm those languages are enabled at the portal level in Configuring Language Settings — both were added in a recent platform release.
See Also
<< Sharing Active Pages and Classes | Active Pages Troubleshooting >>