We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Mutli-Language support for page on which we have a Diagram?

Thread ID:

Created:

Updated:

Platform:

Replies:

132438 Sep 1,2017 09:48 AM Sep 4,2017 12:56 AM JavaScript 2
loading
Tags: ejDiagram
Jim Jacobs
Asked On September 1, 2017 09:48 AM

Hi,

We are attempting to provide multi-language support for the page on which the diagram is rendered.
We do not have a need to actually convert any of the diagram information (what's on the canvas) or any of the JSON data.
We have tried adding the following statement:

$("#DiagramContent").ejDiagram({ locale: "en-US" });

The above statement was placed before the diagram.load statement.
Additionally we have added the following to the page declaration:

Culture="auto:en-US" UICulture="auto:en-US"

If we leave our Windows culture set to en-US, everything works fine.
If we change our locale to fr-FR, we get the following exception when trying to render the page:

ej.diagram.js:18273 Uncaught TypeError: Cannot read property 'cut' of undefined

    at Object._renderContextMenuItem (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:16:31052)

    at Object._renderContextMenu (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:17:987)

    at Object._initContextMenu (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:16:30779)

    at Object._setModel (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:9:26708)

    at Object.setModel (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:1:18073)

    at r.fn.init.$.fn.(anonymous function) [as ejDiagram] (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:1:29906)

    at Object.load (http://navvia.net/NavviaNewDev/Syncfusion/Scripts/ej/ej.diagram.min.js:13:13216)

    at OnSuccess_Get (http://navvia.net/NavviaNewDev/Js/Navvia/DiagramWebServices.js:215:17)

We have disabled the context menu on the diagram using the following:

$("#DiagramContent").ejDiagram({
            enableContextMenu: false,
            historyChange: historychange,
            historyManager: {
                canLog: canLog
            }
        });

What are we doing wrong?

We want everything to do with the diagram to remain language neutral - in en-US.

Thanks for any and all advice.

Jim







Jim Jacobs
Replied On September 1, 2017 11:31 AM

Hi,

We were able to get this to work by adding the context menu localization, as shown in your online documentation.

Here's the link:

https://help.syncfusion.com/js/diagram/localization

Jim


Shyam G [Syncfusion]
Replied On September 4, 2017 12:56 AM

Hi Jim, 
We are happy to hear that your problem is resolved. Please let us know if you need further assistance on this. 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;