Localization in UWP Diagram (SfDiagram)

10 May 20211 minute to read

Localization is the process of providing controls in different cultures to help you set your own culture easily. Diagram provides localization support for Context Menu items.

Customizing Context Menu

Localizing context menu

The following code illustrates how to provide localization support for Context Menu items.

  • C#
  • //Sets the Culture 
    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr");//French
    
    System.Resources.ResourceManager manager;
    
    //Sets the Assembly
    Assembly assembly = Application.Current.GetType().Assembly;
    
    manager = new System.Resources.ResourceManager("Localization.Resources.Syncfusion.SfDiagram.UWP", 
              assembly);

    Node with localized context menu

    NOTE

    You have to define the textual descriptions of the context menu items for your custom cultures.