Table of Contents


Labels in the IDE

Labels provide centralized storage and management of user-facing text elements that support multi-language portal implementations by separating display text from code logic. The Labels section in the Integrated Development Environment enables developers to view available translation labels, search for specific labels, and insert label references into code without manual typing or memorization of label API names. Understanding label functionality, search capabilities, insertion processes, and coordination with Translation Studio enables efficient implementation of internationalized portal interfaces.

Labels defined through Translation Studio appear in the IDE's Labels section, providing read-only reference access that enables developers to identify and use existing labels while implementing pages, controllers, classes, and triggers that display user-facing content.

Understanding Labels

Purpose and Functionality

Labels serve as the foundation for multi-language portal implementations by storing user-facing text separately from code logic. This separation enables translation of portal interfaces into multiple languages without modifying code, supporting organizations with international user bases or multi-language community requirements.

Text Abstraction: Labels abstract user-facing text from hardcoded strings in pages and controllers. Instead of embedding literal text like "Submit Form" or "Please enter a valid email address" directly in code, developers reference labels that contain these text values, enabling centralized text management.

Translation Support: Each label can have translations in multiple languages configured through Translation Studio. When users view portal pages, the platform displays label text in the user's selected language automatically, providing seamless multi-language experiences without language-specific code or page versions.

Centralized Maintenance: Label-based text management enables updating displayed text across all usage locations by modifying the label definition rather than finding and updating hardcoded strings throughout numerous code files. Centralized maintenance reduces effort and ensures consistency.

Consistent Messaging: Using labels for common messages, validation errors, button text, and interface elements ensures consistent terminology and phrasing across the portal. Consistency improves user experience and reinforces professional portal appearance.

Labels vs. Hardcoded Text

Hardcoded Text Limitations: Embedding literal text strings directly in code creates maintenance challenges including difficulty finding all occurrences when text changes are needed, inconsistent phrasing when similar messages appear in multiple locations, impossible translation without code modifications, and scattered text management across numerous files.

Label-Based Advantages: Using labels for user-facing text provides centralized text management in Translation Studio, translation capability supporting multi-language users, consistent terminology through label reuse, and text updates without code modifications or redeployment.

When to Use Labels: Use labels for any text displayed to portal users including button labels and link text, form field labels and help text, validation error messages, success and confirmation messages, page headings and section titles, instructional text, and navigation menu items.

When Hardcoding is Acceptable: Hardcoded text may be appropriate for developer-facing log messages, internal variable names and code comments, configuration values not displayed to users, and temporary development placeholder text that will be replaced with labels before deployment.

Accessing Labels in the IDE

Labels Section Location

Navigate to the Labels section in the sidebar navigation tree. This dedicated section appears alongside other IDE sections including Pages, Templates, Controllers & Classes, Triggers, Static Assets, and Entities.

Section Purpose: The Labels section provides read-only reference access to all translation labels configured in Translation Studio. Developers view available labels, search for specific labels, and insert label references into code without leaving the development environment.

Persistent Availability: The Labels section remains accessible throughout IDE sessions regardless of which files are open in the editor. Persistent accessibility enables label reference during any development activity requiring user-facing text.

Expanding the Labels Section

Click the expansion arrow or section header next to the Labels section to expand it and display the complete list of available labels. Expanded view shows all labels with their API names and may include preview text showing label content in the default language.

Label List Display: Expanded Labels section displays labels in a scrollable list organized alphabetically by label API name or grouped by label categories depending on IDE configuration and Translation Studio organization.

Preview Information: Label entries may display preview text showing label content in the portal's default language. Preview text helps developers identify appropriate labels without requiring external reference to Translation Studio.

Scroll Access: The label list supports vertical scrolling when the number of labels exceeds visible space. Scroll within the Labels section to access labels not currently visible in the viewport.

Viewing Available Labels

Label Organization

Labels appear in the Labels section list with their exact API names as configured in Translation Studio. Label API names must be used when referencing labels in code, making the displayed names authoritative references for development.

API Name Display: Labels display with their complete API names including any prefixes, suffixes, or naming conventions established in Translation Studio. API names are case-sensitive and must match exactly when referenced in code.

Label Naming Conventions: Organizations typically establish label naming conventions that include descriptive components such as "Button_Submit," "Error_InvalidEmail," "Label_FirstName," or similar patterns that communicate label purpose and usage context.

Categories or Prefixes: Labels may use prefixes or naming patterns to group related labels such as "Form_" for form-related labels, "Error_" for error messages, "Button_" for button text, or "Nav_" for navigation items. Consistent prefixes enable efficient label location and organization.

Label Content Preview

When label entries display preview text, this content shows the label's value in the portal's default language. Preview text helps developers verify label content and determine whether specific labels are appropriate for intended uses without switching to Translation Studio.

Default Language Display: Preview text reflects the default language configured for the portal in Translation Studio. Labels with translations in multiple languages show only default language text in IDE preview, though all translations are available when labels are rendered on portal pages.

Content Verification: Use preview text to verify that labels contain expected content, confirm that label phrasing matches intended usage, identify similar labels with subtle content differences, and select the most appropriate label when multiple options exist.

Preview Limitations: Preview text may be truncated or abbreviated in the IDE display due to space constraints. Full label content including complete text and all translations is accessible through Translation Studio when detailed review is needed.

Searching for Labels

Search Functionality

The Labels section includes search functionality enabling keyword-based filtering of the label list. Search operates on label API names and may include preview text content depending on implementation, enabling location of specific labels without manual scrolling through complete lists.

Search Field Location: A search field appears within or above the Labels section, accepting text input for filtering displayed labels. Search field placement follows sidebar section patterns for consistency across IDE sections.

Real-Time Filtering: As text is entered in the search field, the label list filters automatically to display only labels matching search criteria. Real-time filtering provides immediate feedback and enables iterative refinement of search terms.

Case-Insensitive Search: Label search typically operates case-insensitively, matching labels regardless of capitalization used in search terms. Case-insensitive search reduces friction and enables efficient label location without exact case memory.

Search Strategies

API Name Search: Search using portions of label API names to locate labels with specific naming patterns. For example, searching "Button" finds all labels with "Button" in their API names, such as "Button_Submit," "Button_Cancel," and "Button_SaveDraft."

Content Search: If search operates on preview text content, enter words that appear in label text to find labels containing specific phrases. Content search helps locate labels when API names are unclear but desired text content is known.

Prefix Search: When labels follow prefix-based naming conventions, search using common prefixes to display all labels in specific categories. Prefix search enables browsing related labels grouped by purpose or context.

Incremental Refinement: Start with broad search terms and add characters progressively to narrow results. Incremental refinement helps when exact label names are uncertain or when exploring available labels for specific purposes.

Clearing Search

Clear the search field to restore the complete unfiltered label list. Most search implementations provide a clear button (X icon) within the search field for quick search term removal without manual text deletion.

Full List Restoration: Clearing search restores display of all available labels, enabling unrestricted browsing and access to labels outside initial search criteria. Full list restoration supports exploration after focused search activities.

Inserting Labels into Code

Insertion Process

Open a Controller, Class, Trigger, or Active Page in the editor to display the code editing interface. Position the text cursor at the location where the label reference should appear in the code.

Navigate to the Labels section in the sidebar and locate the desired label through browsing or search functionality. Verify that the selected label is appropriate for the intended use by reviewing its API name and preview text.

Right-click on the label name to display the context menu. Select the insertion option from the context menu (the exact menu item text may be "Insert" or "Insert Label" depending on IDE configuration).

The IDE automatically inserts the label API name or label reference syntax at the current cursor position in the open code file. The inserted reference includes correct case-sensitive naming matching Translation Studio definitions.

Insertion Context

Supported File Types: Label reference insertion works with Controllers, Classes, Triggers, and Active Pages. Any code file where label references are appropriate supports automatic label insertion from the Labels section.

Code Context Awareness: Inserted label references may be plain label API names or complete label reference syntax depending on IDE implementation and target file type. Developers may need to wrap inserted names in appropriate label reference syntax for the specific code context.

Active Page vs. Code Files: Label insertion in Active Pages may generate complete label reference markup appropriate for HTML content, while insertion in Controllers, Classes, or Triggers may insert only the label API name requiring developers to wrap it in platform-specific label access syntax.

Coordinating with Translation Studio

Label Creation Requirements

Labels cannot be created or edited directly within the IDE. The Labels section provides read-only reference access enabling developers to view and use existing labels but not to define new labels or modify label content.

Translation Studio Dependency: All label creation, content editing, translation management, and label configuration occurs in Translation Studio, a separate administrative interface for managing portal translations and multi-language content.

Workflow Coordination: Effective label-based development requires coordination between developers implementing code and administrators managing Translation Studio. Developers identify needed labels during development and communicate requirements to Translation Studio administrators for label creation.

Development Workflow

Label Requirement Identification: During development, identify user-facing text that should use labels including form field labels, button text, error messages, success messages, instructional text, and any content requiring translation or centralized management.

Existing Label Search: Before requesting new labels, search the Labels section to determine whether appropriate labels already exist. Reusing existing labels promotes consistency and reduces label proliferation.

New Label Requests: When appropriate labels don't exist, document required labels including desired API names, content in default language, usage context, and any special considerations. Communicate requirements to Translation Studio administrators for label creation.

Label Availability Timing: After Translation Studio administrators create new labels, reload or refresh the IDE to ensure the Labels section displays newly created labels. New labels become available for insertion after IDE refresh.

Implementation After Creation: Once new labels appear in the Labels section, implement label references in code using automatic insertion functionality. Verify that label content displays correctly when pages render by testing implemented functionality.

Translation Studio Link

For comprehensive information about creating labels, managing translations, configuring language settings, and other Translation Studio functionality, reference the Translation Studio documentation. [Link to Translation Studio documentation]

Translation Studio Capabilities: Translation Studio provides interfaces for creating new labels, editing label content in multiple languages, organizing labels into categories, managing language settings, configuring default languages, and exporting/importing translations.

Administrator Access: Translation Studio typically requires administrative permissions. Developers without administrator access must coordinate with authorized personnel for label management activities.

Label Usage Best Practices

Consistent Label Usage

Reuse Existing Labels: Search for and reuse existing labels whenever possible rather than creating new labels for similar content. Label reuse promotes consistent terminology, reduces translation effort, and simplifies label management.

Standard Patterns: Follow organizational standards for label naming conventions, usage patterns, and text style. Consistent patterns improve label discoverability and enable predictable label identification during development.

Descriptive API Names: When requesting new labels, suggest descriptive API names that clearly communicate label purpose and content. Descriptive names like "Button_SaveChanges" or "Error_RequiredFieldMissing" support efficient label location and usage.

Development Planning

Early Label Identification: Identify label requirements early in development planning before implementing code. Early identification enables label creation in Translation Studio before development implementation, preventing development delays waiting for label availability.

Label Documentation: Maintain documentation of labels used in specific features, pages, or modules. Documentation supports maintenance activities, enables identification of impacted areas when label content changes, and facilitates troubleshooting of text display issues.

Mock Text vs. Labels: During initial development before labels exist, consider using clearly marked placeholder text that will be replaced with label references before completion. Placeholder text enables development progress while label creation proceeds in parallel.

Translation Considerations

Translation-Friendly Content: When requesting label content, consider translation implications including avoiding idioms or cultural references that may not translate well, keeping text concise to accommodate language expansion, providing context that helps translators understand meaning, and considering placeholder variable positions for dynamic content.

Parameter Support: Some label systems support parameters that insert dynamic values into label text. Understand parameter syntax and limitations when designing labels that include variable content like names, dates, or quantities.

Multi-Language Testing: Test portal functionality with multiple language settings to verify that labels display correctly in all supported languages, text fits properly in interface layouts, and translations convey intended meaning accurately.

Troubleshooting Label Issues

Label Not Appearing in IDE

Recent Label Creation: If newly created labels don't appear in the IDE Labels section, reload or refresh the IDE to update the label list. Label list updates may require IDE session restart or browser refresh.

Translation Studio Sync: Verify that labels were successfully saved in Translation Studio and that no errors occurred during label creation. Confirm label existence in Translation Studio before expecting IDE availability.

Permission Issues: Verify that the portal user account has appropriate permissions to access labels. Some implementations may restrict label visibility based on user roles or permissions.

Label Display Issues in Portal

Incorrect Label Reference: If label text doesn't display correctly on portal pages, verify that label API names are spelled correctly with exact case matching, label references use correct syntax for the code context, and referenced labels actually exist in Translation Studio.

Language Settings: If labels display in unexpected languages or show label API names instead of text content, verify that user language preferences are set correctly, default language is configured properly in Translation Studio, and translations exist for the user's selected language.

Missing Translations: If labels display correctly in some languages but not others, check that translations exist in Translation Studio for all required languages. Missing translations may cause fallback to default language or display of label API names.

Label Search Issues

No Results: If label searches return no results when matches should exist, verify search term spelling, try partial terms instead of complete names, experiment with different search approaches (API name vs. content), and confirm that expected labels actually exist in Translation Studio.

Too Many Results: If searches return excessive results, refine search terms using more specific keywords, include prefix patterns that narrow results to specific label categories, or use longer search strings that match fewer labels.


Jump to IDE Checklist

<< IDE Navigation and Interface