web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to translate JS error in other language?

(0) ShareShare
ReportReport
Posted on by 224

Hi Experts

I need some help. do you know any tutorials or blog on how to translate the Javascript error message in other language? Like the error message "is undefined at Anonymous function".

4604.ErrorTranlated.png

Thank you so much for the help.

*This post is locked for comments

I have the same question (0)
  • KaeL Profile Picture
    224 on at

    Hi Guys

    Do you have any idea, know some blog or tutorial on how to translate the generated javascript error on different language? like the error "is undefined at Anonymous function" when the user change the language of the interface.

     ErrorTranlated.png

    Thanks in advance for the help.

  • Verified answer
    PranavShroti Profile Picture
    4,510 on at

    Hi,

    1.  Declare a variable in JavaScript that defines the current language and set up a JavaScript object that contains the different messages.

    var language = "en";

    var msg = {en: "English alert", fr:"French alert"};

    alert(mes[language ]);

    2. Inside your webresources: Check the logged in user language preferences and switch based on this variables.

    3. You can also store these messages in a custom entities and pull based on languages.

    Hope this helps !

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Please, no duplicated threads.

  • KaeL Profile Picture
    224 on at

    Sorry i cant find my first question and it shows on my notification "There was an error loading the notification."  every time i refresh my notification

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    I already merged threads.

  • KaeL Profile Picture
    224 on at

    Thank you so much for the help and I'll try your solution.

  • KaeL Profile Picture
    224 on at

    Hi Sir i have a question, is there a way that the error message automatically translate  to the other language?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans