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
  • There is a relatively convoluted example here that does this: Samples.UIHelpers/src/Common/src/ConfigurationManager.js at master · M-Files/Samples.UIHelpers (github.com)

    When the ShellUI starts up it reads the current language from the registry and passes it to a vault extension method.  The vault extension method loads the appropriate strings and populates an object inside the UIX with them.  Once this object is populated the various UI components (e.g. the context menu command) are created using the appropriate localised strings.

  • 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. 

Reply Children
No Data