Click here to Skip to main content
15,882,209 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I cerated a application to change langauge convertion from english to swahili language. it's work well. but when ever i created the setup for the application, i unable to access the swahili resx file. one english language is displaying. how to i get the swahili resource files. here i am using windows application
Posted

You do not really need to access resource files manually.

It is already done for you by .NET framework using the mechanism of satellite assemblies. You only need to specify required thread culture and thread UI culture; and the satellite assembly is selected automatically, with the fallback mechanism.

Read on creation and using of satellite assemblies: http://msdn.microsoft.com/en-us/library/21a15yht%28v=VS.100%29.aspx[^] and around this MSDN article.

No, how to assign a culture? Something like this:

C#
System.Globalization.CultureInfo myCulture =
   new System.Globalization.CultureInfo("es-ES", false); //the string can come from config. file and the like

//...

System.Threading.Thread myThread = System.Threading.Thread.CurrentThread;
myThread.CurrentCulture = myCulture;
myThread.CurrentUICulture = myCulture;


See:
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx[^],
http://msdn.microsoft.com/en-us/library/bkb1k2x8.aspx[^].

You need to read about full chain of techniques for globalization of the project and following localizations for each culture. Technically, it's easy enough when you know what's involved.

http://msdn.microsoft.com/en-us/library/ms752337.aspx[^],
http://msdn.microsoft.com/en-us/library/aa292205%28v=vs.71%29.aspx[^],
http://msdn.microsoft.com/en-us/library/ms788718.aspx[^],
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx[^].

—SA
 
Share this answer
 
Comments
CS2011 9-Sep-11 1:12am    
Nice Answer. 5+ for the extra links.
Sergey Alexandrovich Kryukov 9-Sep-11 13:05pm    
Thank you.
--SA
Mehdi Gholam 9-Sep-11 1:13am    
My 5!
Sergey Alexandrovich Kryukov 9-Sep-11 13:05pm    
Thank you, Mehdi.
--SA
i got the answer.
here we can add that dll file into setup..... i.e when we creating setup file here one option is there "Appliction folder" here we add one extra folder i.e same as our resource file folder( this can be located in Our application bin folder for example we take swahili resource, in bin folder we got sw folder. we can add this follder into applicatio folder in setup... then bulid in ur application. and install setup. you got
 
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