I have a program that the user can switch the program language on run time.
I store the current language used in Program Settings and I access it in my program using
Properties.Settings.Default.Language
Now In my xaml View files I want my buttons to change their ToolTips when the user change the current language.
I have two Rescorces files: EnglishRescource.resxandFrenchRescource.rex
And I bind the ToolTips of my buttons using
ToolTip="{Binding Path=NewDocument, Source={StaticResource Resources}}"
But I don’t know if this is a correct approach. How can I bind to the correct Resource file when the language is switched.
EDIT
I renamed my resources files to Resources.En-US.resx and Resources.Fr-CA.resx
Is there any particular reason you are naming them {language}Resource.resx instead of the standard, Resource.{locale}.resx?
A few sites that might be of use
http://www.codeproject.com/KB/WPF/WPF_Resx_Localization.aspx
http://msdn.microsoft.com/en-us/library/ms788718.aspx