Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

D365 Marketing Page Auto Localization

(0) ShareShare
ReportReport
Posted on by

Hi Team,

The requirement would be to create an intake form, place it on a marketing page, and localize the form based on the visitor’s location. Inside CRM the user-facing form fields (option set labels) and free text fields are translated, if needed, to English.

 

The localized text for the marketing form/page would be provided. We would need to display the localized form/page to the page visitor.  

Thanks,

M Muragaiah.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: D365 Marketing Page Auto Localization

    Hi Muragaiah,

    Here is a simplified solution, please check whether it would help:

    1. Create multiple form field records with different label values and map all of them to same field.

    Field will display in Label value.

    pastedimage1610433886691v2.png

    e.g: Name: First Name(French), Label: Prénom

    Name: First Name(German), Label: Vorname

    2. Create multiple marketing forms with corresponding language form fields.

    3. Create multiple marketing pages with corresponding marketing forms.

    Now we will get several pages and URLs.

    4. Then you can put these URLs to case branches of switch statement of following code, and embed the code on your default English page, it will execute at afterFormLoad event of marketing form.(By using Marketing Form API)

    MsCrmMkt.MsCrmFormLoader.on("afterFormLoad", function (event) {
        detectLanguage();
    });
    
    function detectLanguage() {
        var userLanguage = navigator.language.slice(0, 2);
        /**
         * If there is no matching translation page, stay on default English page
         **/
        switch (userLanguage) {
            case "fr":
                location.href = "URL to French form";
                break;
            case "de":
                location.href = "URL to German form";
                break;
            default:
                return true;
        }
    }

    User will be navigated to corresponding language form page, or stay at current page if there is no matching language page.

    The code above is modified based on answer in this thread:

    https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/377875/marketing-form-translation

    Regards,

    Clofly

  • RE: D365 Marketing Page Auto Localization

    Hi ,

    Thanks, for the inputs and followup,

    is there any other way to achieve this? . based on login user location form language should open?

    Thanks,

    M Muragaiah.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: D365 Marketing Page Auto Localization

    Hi Muragaiah,

    Please let me know whether the solution would work for you, or whether any further assistance is required to implement customization.

    Regards,

    Clofly

    If you had found any answer helped, please kindly mark as verified to close the thread, it would be really appreciated.

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: D365 Marketing Page Auto Localization

    Hi Muragaiah,

    It seems that translating label text by JavaScript would the solution for your requirement, see my first answer in following thread:

    https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/394405/d365-marketing-form-hosted-in-external-website-in-multiple-languages

    Regards,

    Clofly

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans