Kentico Xperience 13 documentation and ASP.NET Core

Most documentation about running Xperience applications under ASP.NET Core can be found in a dedicated section: Developing Xperience applications using ASP.NET Core. The rest of the documentation still applies, but some code samples and scenarios might need slight modifications for Core projects.

All major differences between the MVC 5 and Core platforms are summarized in Migrating to ASP.NET Core.


Localizing form fields

To provide multilingual support for forms, define resource string keys via the Localization application and use them when specifying the properties of individual form fields, such as the label, tooltip, explanation text, or other custom properties supporting text input. Resource strings store different translations under a single unique value that, when inserted using specific syntax, automatically resolves into text localized into the language preferred by site visitors.

Localized form

When localizing a form:

  1. Create resource string keys using the Localization application
  2. Localize form fields via the properties panel
On this page

Related pages

Creating new resource strings using the Localization application

To create new resource strings:

  1. Open the Localization application.

    Editing of resource strings in the Localization application is only possible for users who belong to roles with the Localize strings permission for the Localization module.

    If you do not see the application in the Application menu or are unable to access it, please contact your site's administrator and ask them to grant the required permissions to your account.

  2. Choose the default culture in the Culture selector.
  3. Click New string.
  4. Type the name of the resource string into the Key field.
  5. Type the text for the key into the Translation field of the corresponding language.

  6. Click Save.

You have added a new resource string and can use it to localize form field properties such as the label and tooltip.

Translating existing resource strings into additional languages

If a site expands its multilingual support to additional languages, you can edit existing resource strings and add localizations for new languages as necessary:

  1. Open the Localization application.
  2. Edit () a resource string.
  3. If you do not see the desired language, use the Show translation for radio buttons to change the category of cultures.
  4. Translate the string into the desired language in the corresponding Translation field.
    Localizing a resource string into other languages

  5. Click Save.

You have now added a new translation to the existing resource string key.

Localizing form fields

When you have created the required resource string keys, you are ready to localize your form:

  1. Open the Forms application and edit () a form.
  2. Switch to the Form builder tab.
  3. Select an existing field or place a new one.
  4. On the properties panel, enter the {$key$} macro expression into the input field of the property you wish to localize. Substitute 'key' with the resource string key you created in the Localization application.
    • For example, the following image illustrates the localization of the Label and Explanation text properties into Spanish using created formfield.firstname and formfield.firstname.explanationtext resource string keys.
       Localizing form fields using resource strings
    • Click Submit.

In the form builder preview, the system resolves the given key to the text you specified for the default UI culture. Site visitors will always see the text in their selected culture.

Was this page helpful?