Search code examples
c#wizardcatel

Is it possible to change the used UICulture for Orc.Wizard?


I create an application that uses english language no matter the current system culture. For all catel windows this is no problem by using DataWindowMode.Custom and e.g.

AddCustomButton(new DataWindowButton("Save", "SaveCommand"));

in the constructor.

Now I created a wizard (Orc.Wizard) with some pages, but I can not find a way to change the culture for the used buttons and the popup windows when e.g canceling the wizard. Changing the Current(UI)Culture and DefaultThreadCurrent(UI)Culture has no effect.

Is there an easy way to change the uiculture for Orc.Wizard, or do I have to customize the default implementation of the wizard (copy pasta)?


Solution

  • So, after checking the examples I found out that you have to use the catel language service. I added this in App.xaml.cs

    protected override void OnStartup(StartupEventArgs e) {
        var serviceLocator = ServiceLocator.Default;
        var langService = serviceLocator.ResolveType<ILanguageService>();
        langService.PreferredCulture = new CultureInfo("en-US");
        langService.FallbackCulture = new CultureInfo("en-US");
    } 
    

    This did the trick.