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

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







2 Replies

JJ Jim Jacobs September 1, 2017 03:31 PM UTC

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



SG Shyam G Syncfusion Team September 4, 2017 04:56 AM UTC

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 


Loader.
Up arrow icon