1

I'm looking to utilize the Windows dialogs, such as the Windows.Storage.Pickers.FileSavePicker() or the print dialog with the language my application has selected, not the language that the OS is currently using.

My application can change the language at run time, and it is working nicely for the most part, by doing the following with all my resources set up and the other language installed:

System.Globalization.CultureInfo.CurrentUICulture = new System.Globalization.CultureInfo(selectedLanguageCode);
System.Globalization.CultureInfo.CurrentCulture = new System.Globalization.CultureInfo(selectedLanguageCode);
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = selectedLanguageCode;

However, the only thing that doesn't change is my Windows dialogs, they appear to stay in the language of the OS and not what I've selected in my application.

The methods in question for FileSavePicker do not have any properties or settings that allow me to change the language.

Does anyone have any ideas on how I can change this so if I'm using French on and English computer it will show the Windows dialog box in French?

Michael Woolsey
  • 803
  • 8
  • 15

1 Answers1

0

I'm sorry but Windows dialogs cannot be localized with UWP apps (not sure about WPF projects).

Matei Radu
  • 2,038
  • 3
  • 28
  • 45
  • 1
    May I ask how you determined that the Windows dialogs cannot be localized? – Michael Woolsey Oct 12 '16 at 16:58
  • 1
    A fair question you pose. I did not find any confirmation that they cannot be localized but at the same time no MSDN article on localization or documentation about dialogs for UWP mention any possibility. Also, given the sandbox nature of UWP apps I assume that dialogs such as file pickers are OS handled and thus universal apps cannot interact with them at that desired level. Sorry for the long explanation but my answer is based only experience since I didn't found any docs to back it up. – Matei Radu Oct 12 '16 at 21:50
  • Thank you for your explanation. I was thinking the same thing, I didn't know if I had missed some documentation somewhere explaining it. I'm going to leave the question open for a while longer in case someone else has a possible solution. Thank you. – Michael Woolsey Oct 13 '16 at 13:30
  • Indeed leave it open for some time: I'm a normal person than can make mistakes. Plus I'm also quite interest in this matter and I hope someone will prove me wrong. – Matei Radu Oct 13 '16 at 13:35
  • All my searching has revealed that I couldn't do it either. I'll mark your answer as correct, thank you for your effort. – Michael Woolsey Oct 31 '16 at 13:24