Localization

Translation

Halstack Design System provides the possibility to translate all the labels, that cannot be changed by the component properties, through the Halstack Provider and its property labels.

You will need to create an object with your translations. In this object, you will have as much objects as components you want to translate, using the label from the list we will show below, following the structure you can see in the example.

Translation example

Default labels

The following lists define the structure of the JSON object containing the different components and the associated labels.

formFields

FormFields labels are common to several components of the design system.

Label NameDefault value
optionalLabel(Optional)
requiredSelectionErrorMessageThis field is required. Please, choose an option.
requiredValueErrorMessageThis field is required. Please, enter a value.
formatRequestedErrorMessagePlease match the format requested.
lengthErrorMessageMin length minLength, max length maxLength.It is a function that receives two parameters (minlength and maxlength) and returns the text with those parameters.
logoAlternativeTextLogo

alert

Label NameDefault value
infoTitleTextinformation
successTitleTextsuccess
warningTitleTextwarning
errorTitleTexterror

dateInput

Label NameDefault value
invalidDateErrorMessageInvalid date.

fileInput

Label NameDefault value
fileSizeGreaterThanErrorMessageFile size must be greater than min size.
fileSizeLessThanErrorMessageFile size must be less than max size.
multipleButtonLabelDefaultSelect files
singleButtonLabelDefaultSelect file
dropAreaButtonLabelDefaultSelect
multipleDropAreaLabelDefaultor drop files
singleDropAreaLabelDefaultor drop file
Label NameDefault value
copyrightText© DXC Technology year. All rights reserved.It is a function that receives one parameter (year) and returns the text with that parameter.

numberInput

Label NameDefault value
valueGreaterThanOrEqualToErrorMessageValue must be greater than or equal to value.It is a function that receives one parameter (value) and returns the text with that parameter.
valueLessThanOrEqualToErrorMessageValue must be less than or equal to value.It is a function that receives one parameter (value) and returns the text with that parameter.
decrementValueTitleDecrement value
incrementValueTitleIncrement value

paginator

Label NameDefault value
itemsPerPageTextItems per page
minToMaxOfTextminNumberOfItems to maxNumberOfItems of totalItemsIt is a function that receives three parameters (minNumberOfItems, maxNumberOfItems and totalItems) and returns the text with those parameters.
goToPageTextGo to page:
pageOfTextPage: pageNumber of totalPagesNumberIt is a function that receives two parameters (pageNumber and totalPagesNumber) and returns the text with those parameters.

passwordInput

Label NameDefault value
inputShowPasswordTitleShow password
inputHidePasswordTitleHide password

quickNav

Label NameDefault value
contentTitleContents

radioGroup

Label NameDefault value
optionalItemLabelDefaultN/A

select

Label NameDefault value
noMatchesErrorMessageNo matches found
actionClearSelectionTitleClear selection
actionClearSearchTitleClear search

textInput

Label NameDefault value
clearFieldActionTitleClear field
searchingMessageSearching...
fetchingDataErrorMessageError fetching data