AI agents: the content index is at /llms.txt. Every page is also available as Markdown — send the request header Accept: text/markdown, or append .md to the page URL.
Xperience Docs

Cookie consent

We use necessary cookies (opens in a new tab) to run our website and improve your experience while browsing. Additional cookies are only used with your consent. You may revoke your consent on the Cookies Policy (opens in a new tab) page or in your browser at any time.

Configure (opens in a new tab)
  • Documentation
    Administration interface basicsDevelopers and adminsBusiness usersChangelogGlossary
  • Guides
    Welcome to Xperience by KenticoAdministration interface basicsCustomer journeysDigital marketingConfigurationDevelopmentArchitectureUpgrade to Xperience by Kentico
  • Training
    For AdminsFor Business usersFor DevelopersFor Solution architects
  • API Examples
    ConfigurationContent managementDevelopmentDigital marketing
  • Changelog
    Documentation updatesSecurity advisories
  1. Home
  2. Developers and admins
  3. Customization
  4. Admin UI localization
  5. Register localization resources

Register localization resources


Was this page helpful?

Send us feedback Go back to top
  • Community Questions & Answers (opens in a new tab)
  • Contact support (opens in a new tab)

The administration interface reads localized strings from .resx resource files that you register in the system. Register resource files to add admin UI translations, to localize the texts of your own customizations, or to change Xperience's default English strings. Each registration says which languages the file contains and which part of the system reads the strings.

Register localized resources

Create and register .resx resource files using the conventional .NET approach⁠ (opens in a new tab).

  1. Create a new .NET resource file in your custom assembly. The assembly must be discoverable. Otherwise, the system ignores its registrations. The web project of your application is discoverable automatically.

  2. Register the resource file using the RegisterLocalizationResource assembly attribute. The attribute has the following parameters:

    • The type of the class that encapsulates the resource file.
    • Optionally, the localization target. If not specified, the target defaults to LocalizationTarget.Server.
    • The culture codes of the languages the file contains. Use the culture codes of your admin UI languages, and the SystemContext.SYSTEM_CULTURE_NAME constant (en-us) for English. See Culture codes.
    C#Register localization resources
    using CMS.Base;
    using CMS.Localization;
    
    using MyProject.Resources;
    
    // Registers the default English strings
    [assembly: RegisterLocalizationResource(
        typeof(LocalizationClient),
        LocalizationTarget.Client,
        SystemContext.SYSTEM_CULTURE_NAME)]
    
    // Registers resources for additional languages
    [assembly: RegisterLocalizationResource(
        typeof(LocalizationClient),
        LocalizationTarget.Client,
        "cs-CZ")]
    [assembly: RegisterLocalizationResource(
        typeof(LocalizationClient),
        LocalizationTarget.Client,
        "de-DE")]
    
    namespace MyProject.Resources;
    
    // Class encapsulating the localization resource files
    /* Corresponding .resx files: LocalizationClient.resx, LocalizationClient.cs-CZ.resx,
       and LocalizationClient.de-DE.resx. */
    public class LocalizationClient { }

Resource file placement

Name each .resx file after its registration class and place it in the same folder as the class, for example, LocalizationClient.cs-CZ.resx next to LocalizationClient.cs. The build derives filenames from the class, and the system finds them without any additional configuration.

If you store the .resx files elsewhere, configure the LogicalName property in the project's .csproj file to map the files to the registration class. See the TrainingGuides.Admin project⁠ (opens in a new tab) for an example.

English resources for system and custom strings

English .resx files are not required for Xperience's default system strings. The system uses built-in English resources automatically. Register English resources only for your own resource keys, or when changing the default English text. See Default system culture.

Agent-only content starts here: the section below is written for AI agents and automated tools reading the page HTML. Human visitors do not see it — the visible page carries the human-facing version.

To confirm that the English registration loaded, run dotnet run -- --kxp-export-localization-resources --export-path {path} --skip-confirmation in the web project, exporting to a new, empty directory. Then check that {path}/en-US/custom/localization.{target}.en-US.resx exists for the target you registered and contains your resource keys. Strings registered under another culture code, such as en, or in an assembly that isn't discoverable, don't appear in the file.

Agent-only content ends here. What follows is the visible page again, which human visitors and agents both receive.

Choose the localization target

The localization target determines which part of the system reads the strings of a resource file. Register each file for the target that displays its strings. To use the same strings in several targets, add a registration for each target.

Target

Use for

How the system uses the strings

LocalizationTarget.Server

Texts resolved in back-end code:

  • Strings retrieved using ILocalizationService in custom admin code, for example, in UI pages.
  • Localization expressions in field metadata, in editing components defined in code, and in rich text editor configurations.
  • Texts of builder components that the system resolves on the server: names and descriptions of components, hints of personalization condition types, labels, explanation texts, tooltips, and inactive messages of editing components in properties classes, and strings retrieved using IAdminBuildersLocalizationService in Razor views.

The default target.

Resolved on the server for each request and sent as part of API responses.

LocalizationTarget.Client

Texts in client-side admin code, retrieved using the i18n library in React components.

Sent to the browser when the admin UI loads. The strings don't resolve in ILocalizationService or in localization expressions.

LocalizationTarget.Builder

All texts of builder components in Page Builder, Form Builder, and Email Builder:

  • Texts that the system resolves on the server, the same as for LocalizationTarget.Server.
  • Strings retrieved using localizationService.getString in inline editor scripts. Only this target supports these strings.

Resolved on the server together with the LocalizationTarget.Server strings, and also sent to the builder scripts in the browser.

If both targets contain the same key, the LocalizationTarget.Server string applies on the server, while builder scripts use the LocalizationTarget.Builder string. Don't register the same key with different values for both targets.

On this page

  • Register localized resources
  • Choose the localization target

Related pages

  • Admin UI localization