Click here to Skip to main content
12,818,785 members (28,273 online)
Click here to Skip to main content
Add your own
alternative version


7 bookmarked
Posted 17 Jun 2014

Globalization in WPF

, 17 Jun 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Create a multilingual application WPF


How can we create a multilingual application in WPF?


This code is developed in VS2012.

Using the Code

Create a new WPF Application Project. By default, you will get App.xaml & MainWindow.xaml forms.

Now create a new ClassLibrary project in the same solution for resource files. You can also create resource files in the same project.

And add Resource files in that ClassLibrary. I have added 2 in my project named as Language.resx (for English) and (for German). Mention your lables, buttons, etc. translations in those files. And make the Access Modifier as PUBLIC

Build your class Library and add reference in WPF project.

Now open App.xaml code behind and write the below lines in default constructor:

By default, I have mentioned de-DE as culture. For English, you can leave it blank.

Now open MainWindow.xaml and design the page as per your requirement. But add the namespace of class library in Window tag as per below:

Now bind the controls as per their content, as per below screen:

And now run the application. That's it................enjoy programming.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Vipul Bhatnagar
Technical Lead
India India
Having working experience of 8+ Years in IT , major experience is in Banking/Finance , Engineering, e-Commerce web development.
Worked with .NET, SharePoint. Having good command on SharePoint 2010, ASP.NET with C# , C#, VB.NET, Ajax, JavaScript, WPF, Web Services, Window Services, MS SQL Server, Azure.

You may also be interested in...

Comments and Discussions

GeneralMy vote of 5 Pin
Member 1138346324-Nov-15 20:02
memberMember 1138346324-Nov-15 20:02 
QuestionLanguage change at runtime? Pin
Maximilian Haru Raditya19-Jun-14 10:33
memberMaximilian Haru Raditya19-Jun-14 10:33 
AnswerRe: Language change at runtime? Pin
Vipul Bhatnagar19-Jun-14 20:22
memberVipul Bhatnagar19-Jun-14 20:22 
QuestionThanks Pin
Kapul Kumar Bhatnagar18-Jun-14 21:13
memberKapul Kumar Bhatnagar18-Jun-14 21:13 
GeneralThanks for valuable feedback Pin
Vipul Bhatnagar18-Jun-14 4:07
memberVipul Bhatnagar18-Jun-14 4:07 
QuestionThanks! Pin
Tokinabo18-Jun-14 3:22
memberTokinabo18-Jun-14 3:22 
GeneralMy vote of 4 Pin
Lusvardi Gianmarco (Jymmy097)17-Jun-14 3:27
memberLusvardi Gianmarco (Jymmy097)17-Jun-14 3:27 
GeneralNice article Pin
Member 803348217-Jun-14 3:15
memberMember 803348217-Jun-14 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 17 Jun 2014
Article Copyright 2014 by Vipul Bhatnagar
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid