0

I am using a Frame object in my application to navigate through all of my screens (user controls).

My language page can be accessed from a couple different locations. When the new language is selected I use the Frame.GoBack() method to return to the previous screen. However, when I go back, the screen is still in the previously selected language. All pages navigated to thereafter are in the correct language.

We are setting the language by setting the threads Culture and the application automatically loads the translations from the correct resource file.

How can I force the Frame to reload the resources of the user control with the new culture or determine what type of page I was previously at and load that user control again?

I looked at this post, but I can not use what they explained. Because there is no public property that will allow instantiating the previous object. WPF/Silverlight NavigationService backstack

I am setting the resources of the page in the XAML using:"{x:Static resx:Translations.HelloWorld}" and then setting the culture using:Thread.CurrentUICulture = cultureInfo & Thread.CurrentCulture = cultureInfo

Community
  • 1
  • 1
  • Just to clarify, if you go back one more time, will that page have the correct language? If so, will then going forward work? Obviously this isn't a solution that will work in all scenarios, but I'm interested if all pages in the back stack retain their original strings. Also, are you using `DynamicResource` or `StaticResource` (or maybe even `Binding`s) to access your localized strings? – Abe Heidebrecht Aug 19 '13 at 20:28
  • Theoretically, yes; If I were to go back n times, it should load the current language I selected. Going forward currently works as described. I am assuming that each page going back also has its original string, though I have yet to test this case. I am using "{x:Static resx:Translations.HelloWorld}" and setting the Culture using Thread.CurrentUICulture = cultureInfo & Thread.CurrentCulture = cultureInfo. – Chris - Haddox Technologies Aug 20 '13 at 01:45

0 Answers0