The Translation Input Component is a specialized form control that allows users to enter and manage localized text content in multiple languages. This component provides a user-friendly interface for creating and editing multilingual content with integrated language selection capabilities. It's particularly useful for internationalization scenarios where text values need to be maintained in different languages, such as product descriptions, error messages, or any user-facing text that requires localization.
labelTranslations - Sets the label text displayed above the input field, with support for multiple languages. For example, {"en-US": "Enter Product Name", "de-DE": "Produktname eingeben"} ensures proper localization of the field label based on the user's language settings.
hidden - Controls whether the component is visible in the form. When set to true, the component remains in the form structure but is not displayed, which is useful for conditional translation fields that should only appear in specific scenarios.
saveInLocalStorage - Determines whether the component's entered translations are preserved in local storage between sessions. When enabled, translation data persists between page reloads, improving user experience for complex multilingual forms that may take time to complete.
defaultValue - Sets the initial translation values that will be used when the form is reset. For example, setting to {"en-US": "Default Product", "de-DE": "Standardprodukt"} would pre-populate these translations when a form is first loaded or reset.
readonly - Controls whether the translations can be modified by users. When set to true, the translation field displays the existing translations but prevents changes, which is useful for reference-only scenarios or when translations are managed through another system.
paddingClass - Configures spacing around the translation input component using CSS classes. For example, "p-4" adds medium padding on all sides of the component to improve visual spacing within its container.
dataField - Defines the field name that will be used when submitting form data. For example, setting to "productName" ensures the translations are submitted with this field name in the form data object, making it clear what the translations represent on the server side.
controlsRequestType - Specifies how the translation data is sent in HTTP requests: 'BODY', 'HEADER', or 'PATH'. For example, setting to "BODY" includes the translations in the request body, which is standard for most form submissions with multilingual data.
authorizationDisable - Specifies a policy set that determines when the component should be disabled based on user permissions. For example, setting to "translatorOnlyPolicy" will disable the translation input for users who don't have translation privileges according to the specified policy.
visibilityPolicySetId - Determines the visibility of the component based on specified policy sets. For example, setting to "contentEditorsPolicy" restricts the translation input visibility to users with content editing privileges.
id - Specifies a unique identifier for the component used for programmatic access. For example, "productNameTranslations" enables targeted manipulation of this specific translation field.
dataTestId - Sets the testing hook ID for automated testing. For example, setting to "product-name-translations" allows test scripts to reliably locate this component for automated testing of multilingual content.
enableAsHotspot - Enables the component as a guided tour hotspot. When enabled, the translation input can be highlighted during onboarding or tutorial flows to explain its multilingual functionality to new users.
guidedTourHotSpotTitle - Sets the title for the guided tour hotspot, supporting translations. For example, {"en-US": "Product Name Translations", "de-DE": "Produktname Übersetzungen"} provides clear identification during guided tours.
guidedTourHotSpotDescription - Sets the description for the guided tour hotspot, supporting translations. For example, {"en-US": "Enter product names in multiple languages", "de-DE": "Geben Sie Produktnamen in verschiedenen Sprachen ein"} provides detailed instructions during guided tours.