Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Unanswered

Extend OOTB module translations

Posted on by 35

I read the following documentation page: learn.microsoft.com/.../localize-module

I'm using the CLI command for generating the (master) global.json file. This command is an nice and automatic way to get all language strings out of custom modules: https://learn.microsoft.com/en-us/dynamics365/commerce/e-commerce-extensibility/localize-module#generate-a-resource-globaljson-file

For *.definition.json files it works fine, it extracts automatically all keys under "resources".

But now I want to extend an OOTB module with additional resource keys: Therefore I created an <module-name>.definition.ext.json (f.e. buybox.definition.ext.json) inside of <src>/themes/<my-theme-name>/definition-extensions and added my new resource:

{
    "$type": "definitionExtension",
    "resources": {
        "test": {
            "value": "Test"
        }
    }
}

But it looks like. the cli command yarn msdyn365 generate-resources src ignores *.ext.json files. Means the "test" string is not added to the global.json.

One workaround for now:

Add/duplicate the resource key also into the <my-theme-name>.definition.json.

Down side: I need to maintain the localization in two places and I'm breaking completely the modularization approach because all keys/translation overrides are located in one big file.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans