Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi friends,

I am developing a Multi-Language windows application...
I have made two class libraries for German and English... and dynamically loading it in runtime using this script..
C#
class Language
{
public static string title ;
public static LoadLanguage(string LangPath)
{
        Assembly LAsm = Assembly.LoadFrom(LangPath);
                    Type LType = LAsm.GetType("Lang.MyLang");
                    dynamic LangDllClass = Activator.CreateInstance(LType);
title = LangDllClass.title; 
}
}


The script is being called in main methode, and whenever a user changes the Language...
It works perfectly on first time load, but when I call the function again with different language dll path,,, it will not load the new dll, but The Only the Old dll will be there....

Eg: If I load English at the main methode, EVen if I change the Langauage to German, the dll wont be loaded, The Assembly will use the English only,,,

Please Help friends,,,, i am stuckk :(
Posted

 
Share this answer
 
v3
Comments
Yesudasan Moses 12-Aug-13 10:10am    
Thanks dear friend.... Assembly.LoadFile(LangPath); solved my issue.... ^_^
ridoy 12-Aug-13 10:12am    
Glad to help you,:)
BillWoodruff 12-Aug-13 10:44am    
+5 Thanks, Ridoy, you just gave me the tools to understand something that has been puzzling me a long time. yours, Bill
ridoy 12-Aug-13 12:15pm    
Thanks Bill,:)
Joezer BH 12-Aug-13 10:44am    
5ed!
 
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