How to force WPF application to look for language specific resources?

I try to set the WPF application to display spoecified language, such as fr-FR, fr-CA and en-US.

However, No matter how I tried, it always displays in English. Here are what I tried:

App.xaml.cs:  
MyApp.Resources.JobView.Culture = new CultureInfo("fr-FR");

MainWindow.xaml.cs:
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");
 MyApp.Resources.JobView.Culture = new System.Globalization.CultureInfo("fr-FR");

The culture is set to fr-FR. But when I called:
            System.Resources.ResourceSet r =            MyApp.Resources.JobView.ResourceManager.GetResourceSet(new System.Globalization.CultureInfo("fr-FR"), false, false);

it returns English version.

On the window, it always display in en-US. I have double checked the bin\debug\en-US, fr-Ca and fr-FR. I can find the resource files there.

Anyone may help me ?

Thanks a lot.
LVL 1
chuang4630Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Easwaran ParamasivamCommented:
Provide second parameter as true:


MyApp.Resources.JobView.ResourceManager.GetResourceSet(new System.Globalization.CultureInfo("fr-FR"), true, false);
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chuang4630Author Commented:
How do I force WPF app to run on specific language?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.