Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Commerce forum / Extend OOTB module tra...
Commerce forum
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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans