This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Any way to implement internationalization in UIX side?

To implement internationalization in UIX side we used VaultExtensionMethod to retrieve corresponding UI text, but for some options like dashboard title (dashboard as pop-up window modal) and the context menu, when right click on an object, we couldn't be able to apply internationalization. 

For example, we have tried setting the m-files language to Italian, and we get the button text (within html body tag) as localized value but cannot change the title (within html head -> title tag) - Custom Menu Title to localized one. 



Also for the context menus below we cannot localize the Custom Menu option- 




Any way to achieve localized text from UIX for the above scenarios? 

Parents Reply Children
  • Certainly, I'll review the example. Appreciate your guidance.

  • We could able to change the context menu command name by getting the m-files language using the above approach. But still not being able to change the title of the dashboard modal. 

    Also while using the m-files in browser I got the following error in setting the localized context menu command name - MFiles.ReadFromRegistry is not a function, but there is no error in M-Files desktop.

  • We could able to change the context menu command name by getting the m-files language using the above approach. But still not being able to change the title of the dashboard modal. 

    How are you setting the dashboard title?  Via "IWindow.Title"?

    Edit: Ahh, you did say it was coming from the HTML title tag.  Have you tried Window.Title?

    Also while using the m-files in browser I got the following error in setting the localized context menu command name - MFiles.ReadFromRegistry is not a function, but there is no error in M-Files desktop.

    Yes, you cannot read the registry from the web.  For the web I think you would detect the browser language using "navigator.languages" or similar instead of using the registry (as the registry doesn't drive the language of the browser).

  • Tried setting via document.title, but using IWindow.Title instead worked perfectly! Thank you so much.

    And for browser I'll try your mentioned approach. 

  • Another thing is that, if tried navigator along with the MFiles.ReadFromRegistry(), in M-Files desktop I see undefined error for 'navigator'. 

    Any better approach to add support for both web and desktop?

  • Something like...

    if(typeof MFiles.ReadFromRegistry == "function")
    {
      // Read from the registry.
    }
    else if(navigator)
    {
      // Read from the navigator
    }
    else
    {
      // Fall back to English?
    }