Skip to content

Latest commit

 

History

History
84 lines (58 loc) · 2.9 KB

File metadata and controls

84 lines (58 loc) · 2.9 KB
title description author ms.date ms.topic audience ms.reviewer ms.search.region ms.author ms.search.validFrom ms.dyn365.ops.version ms.custom ms.assetid
Change theme module strings
This article describes how to change module library strings from within a theme in Microsoft Dynamics 365 Commerce.
samjarawan
03/08/2022
article
Developer
v-chgriffin
Global
samjar
2019-10-31
Release 10.0.5

Change theme module strings

[!include banner]

This article describes how to change module library strings from within a theme in Microsoft Dynamics 365 Commerce.

In some cases, modules expose strings that are shown as configurations in a module that can be configured in Commerce site builder. However, other strings, such as the text that is shown for the sign-in button, might be hardcoded as module resource strings.

Override resource strings for a theme

To override resource strings for a theme, use the pattern in the following example to modify the global.json resource file that is located in the src/resources/modules directory.

"{ThemeNamespace}.{ThemeName}.{ResourceString}": {
    "value" : "",
    "_value.comment": ""
}

To learn more about how resource strings are created and how to create a global.json file if one doesn't exist in your software development kit (SDK), see Localize a module.

Override resource strings for preinstalled themes

To override resource strings for preinstalled themes (for example, fabrikam or starter themes), use @msdyn365-commerce-modules as the theme namespace. The following example shows how to change the sign-in link text for the fabrikam theme.

"@msdyn365-commerce-modules.fabrikam.signInLinkText": {
    "value": "Sign in now",
    "_value.comment": "Sign-in Link Text"
}

Override resource strings for custom or local themes

For custom or local themes, use __local__ as the theme namespace. The following example shows how to change the sign-in link text for a custom theme that is named "adventureworks."

"__local__.adventureworks.signInLinkText": {
    "value": "Log in",
    "_value.comment": "Log in Link Text"
}

Note

For shared themes, child themes inherit all the resources string overrides that are linked to the parent theme.

Additional resources

Localize a module

Create a new module

Clone a module library module

Add module configuration fields

Preview and debug a module

Test modules by using module mocks

Test modules by using page mocks

Container modules

Create a layout container module

Create a page container module

[!INCLUDEfooter-include]