|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Best practice to handle "Resource Only Dlls"From the MFC-days we have an app, and depending on the users choice of
international standard and language we load the appropriate resource only dll and pull the strings and other resources from there. This it not dependent on neither culture nor O/S. Is there a good approach to to this in .net? The resources must be in separate file from the app. In MFC you just set up the dll to be Resource Only and that was about done. /Matt Hello,
"zatopek" <zato***@discussions.microsoft.com> wrote in message That's the default behavior in .NET. The main language is kept in the news:5FEAFBAE-FD07-48A7-A9C4-3F29E889656A@microsoft.com... > From the MFC-days we have an app, and depending on the users choice of > international standard and language we load the appropriate resource only > dll > and pull the strings and other resources from there. This it not dependent > on > neither culture nor O/S. > > Is there a good approach to to this in .net? The resources must be in > separate file from the app. In MFC you just set up the dll to be Resource > Only and that was about done. program assembly, and each language gets its own folder under the program directory, named by the language code. Best regards, Henning Krause Can I load this dll from somewhere else?
It was easy to just change the culture. But is it possible to have this dll anywhere with any name and just tell the app to use it? Show quote "Henning Krause [MVP - Exchange]" wrote: > Hello, > > "zatopek" <zato***@discussions.microsoft.com> wrote in message > news:5FEAFBAE-FD07-48A7-A9C4-3F29E889656A@microsoft.com... > > From the MFC-days we have an app, and depending on the users choice of > > international standard and language we load the appropriate resource only > > dll > > and pull the strings and other resources from there. This it not dependent > > on > > neither culture nor O/S. > > > > Is there a good approach to to this in .net? The resources must be in > > separate file from the app. In MFC you just set up the dll to be Resource > > Only and that was about done. > > That's the default behavior in .NET. The main language is kept in the > program assembly, and each language gets its own folder under the program > directory, named by the language code. > > Best regards, > Henning Krause > > > Is there a good approach to to this in .net? The resources must be in You can start from here:> separate file from the app. In MFC you just set up the dll to be Resource > Only and that was about done. http://msdn2.microsoft.com/en-us/library/z68135h5(VS.71).aspx Long story short: change the forms property to localizable, and change the language of the form to the language you want to add. You should do this for each form, there is no global setting :-( When you build the resource only dll is created in the proper place and with the proper name for the resource manager to find it. In order to use it you will just set the CurrentUICulture to the language you want. -- Mihai Nita [Microsoft MVP, Windows - SDK] http://www.mihai-nita.net ------------------------------------------ Replace _year_ with _ to get the real email |
|||||||||||||||||||||||