Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
How to change the language to Tamil using WPF for the application without using resource files. The language should be changed for the full application in one time selection
Posted
Updated 23-Apr-13 3:33am
v2
Comments
Keith Barrow 23-Apr-13 9:17am    
Why without resource files? They will make the task *much* easier.
Mohamed ansari 23-Apr-13 9:27am    
i having lot of control in that so i cannot go on writing resource for all the form at the time
Sergey Alexandrovich Kryukov 23-Apr-13 9:48am    
Wrong. Just the opposite: you should put all text in resources.
—SA
Keith Barrow 23-Apr-13 12:31pm    
I'm with Sergey on this, if you think putting the text into resources is too much effort, you should try not doing that. Then you'll have the effort of replacing MS's work AND creating something equivalent to the resx files.
Resx files are the way to go.

1 solution

Globalization is totally based on resources. In this case, the resources for a particular culture are selected automatically. If you want to switch the culture during run time, all you do is switching the culture of your UI thread (and other threads, those using anything culture-depending). You switch thread's CurrentCulture and CurrectUICulture this way:
http://msdn.microsoft.com/en-us/library/system.threading.thread.currentculture.aspx[^],
http://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx[^].

Please read on globalization and localization: http://msdn.microsoft.com/en-us/library/ms788718.aspx[^].

If you want to go the other way, you would have to re-invent something like resource, in one or another way. You would need to re-assign each and every UI element which carries any text, according to the culture.

However, perhaps we did not understand you, because you don't understand something. Do you really need to switch UI from one culture to another? If you simply want to write the whole application in one language, you can do it without any globalization at all. But why?

Perhaps you are talking only about the possibility to input data in Tamil. In this case, you don't need anything at all. As .NET is based on Unicode, you can always input in any language, not matter what is the culture of your application.

—SA
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900