|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Localization tutorial?Hi;
Is there a good url somewhere that walks through how to localize the resources in a C# forms app? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com Cubicle Wars - http://www.windwardreports.com/film.htm Heya David,
I've always found CodeProject to be full of useful info (even for things I'm not looking for haha) - try this link[1]; it should do what you need PERFECTLY from the little you said. [1]http://www.codeproject.com/dotnet/Localization.asp Regards, Brendon Show quote "David Thielen" <thielen@nospam.nospam> wrote in message news:C48B1CED-3BCC-414F-A33F-06D6BB768045@microsoft.com... > Hi; > > Is there a good url somewhere that walks through how to localize the > resources in a C# forms app? > > -- > thanks - dave > david_at_windward_dot_net > http://www.windwardreports.com > > Cubicle Wars - http://www.windwardreports.com/film.htm > > Hi Dave,
You may refer to the following MSDN document for a walkthrough on how to localize a WinForm appliation: 'Walkthrough: Localizing Windows Forms' http://msdn2.microsoft.com/en-us/library/y99d1cd3(VS.80).aspx Hope this helps. If you have any question, please feel free to let me know. Sincerely, Linda Liu Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Is there a way to do this where the form controls use the resx file? And to
have ti create the resx files with all the needed string entries so we can then just go in to those files and translate the text? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com Cubicle Wars - http://www.windwardreports.com/film.htm Show quote "Linda Liu[MSFT]" wrote: > Hi Dave, > > You may refer to the following MSDN document for a walkthrough on how to > localize a WinForm appliation: > > 'Walkthrough: Localizing Windows Forms' > http://msdn2.microsoft.com/en-us/library/y99d1cd3(VS.80).aspx > > Hope this helps. > If you have any question, please feel free to let me know. > > Sincerely, > Linda Liu > Microsoft Online Community Support > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > > This posting is provided "AS IS" with no warranties, and confers no rights. > > Hi Dave,
> Is there a way to do this where the form controls use the resx file? Sorry that I don't understand your question exactly. Could you please explain more? > And to have ti create the resx files with all the needed string entries so we can then just go in to those files and translate the text?Yes, we have to create .resx files to contain all texts that need to be localized. Sincerely, Linda Liu Microsoft Online Community Support Hi;
What I would like is, for my existing Form app which has all the english text entered directly into the forms to do the following (like how ASP.NET does it): 1) Click some command and it would create myapp_en_us.resx with all the english text for my forms. And all the forms would be changed to pull the text from myapp_*.resx. 2) Copy myapp_en_us.resx to myapp_de.resx. 3) Give just the myapp_de.resx to our German translator. 4) The file is translated. 5) We rebuild with the additional resx file and we now run in German as well as English. Can this be done? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com Cubicle Wars - http://www.windwardreports.com/film.htm Show quote "Linda Liu[MSFT]" wrote: > Hi Dave, > > > Is there a way to do this where the form controls use the resx file? > > Sorry that I don't understand your question exactly. Could you please > explain more? > > > And to have ti create the resx files with all the needed string entries > so we can then just go in to those files and translate the text? > > Yes, we have to create .resx files to contain all texts that need to be > localized. > > Sincerely, > Linda Liu > Microsoft Online Community Support > > Hi Dave,
Thank you for your reply! Yes, what you expected can be done definitely. In fact, the best practice of localizing a WinForm application is like the following: 1. Use VS IDE to create WinForms in the application and make each form localizable, i.e. set the Localizable property of the form to true and build the WinForm application project. 2. When you want the application support another culture later, you can use Windows Forms Resource Editor(Winres.exe) to edit the .resx files, e.g. Form1.resx. Translate the resource text into another language, e.g. German, and save this resx file in German culture, which produces a Form1.de.resx file in the same folder where the Form1.resx resides. 3. Use Resgen.exe tool to convert Form1.de.resx file to ProjectNamespace.Form1.de.resources file(Note, the .resources file should have a full name so that the resource could be accessed by the executable later). For example, type the following command in the VS2005 command prompt: Resgen Form1.de.resx WindowsApplication1.Form1.de.resources 4. Bind all .resources files for a specified culture into a statellite assembly using AL.exe tool. For example, you create Form1.de.resources and Form2.de.resources files, then you need to bind both the two *.de.resources files into a statellite assembly for the culture German. For example, type the following command in the VS2005 command prompt: AL /t:lib /embed:WindowsApplication1.Form1.de.resources /embed:WindowsApplication1.Form2.de.resources /culture:de /out:WindowsApplication1.resources.dll 5. Copy the generated satellite assembly 'WindowsApplication1.resources.dll' into a subdirectory named 'de' under the folder that the executable resides. As you can see, we needn't re-compile the existing WinForm application project to support another culture. Hope this helps. If you have any question, please feel free to let me know. Sincerely, Linda Liu Microsoft Online Community Support Bingo - exactly what I needed. thanks.
-- thanks - dave david_at_windward_dot_net http://www.windwardreports.com Cubicle Wars - http://www.windwardreports.com/film.htm Show quote "Linda Liu[MSFT]" wrote: > Hi Dave, > > Thank you for your reply! > > Yes, what you expected can be done definitely. > > In fact, the best practice of localizing a WinForm application is like the > following: > > 1. Use VS IDE to create WinForms in the application and make each form > localizable, i.e. set the Localizable property of the form to true and > build the WinForm application project. > > 2. When you want the application support another culture later, you can use > Windows Forms Resource Editor(Winres.exe) to edit the .resx files, e.g. > Form1.resx. Translate the resource text into another language, e.g. German, > and save this resx file in German culture, which produces a Form1.de.resx > file in the same folder where the Form1.resx resides. > > 3. Use Resgen.exe tool to convert Form1.de.resx file to > ProjectNamespace.Form1.de.resources file(Note, the .resources file should > have a full name so that the resource could be accessed by the executable > later). For example, type the following command in the VS2005 command > prompt: > > Resgen Form1.de.resx WindowsApplication1.Form1.de.resources > > 4. Bind all .resources files for a specified culture into a statellite > assembly using AL.exe tool. For example, you create Form1.de.resources and > Form2.de.resources files, then you need to bind both the two *.de.resources > files into a statellite assembly for the culture German. For example, type > the following command in the VS2005 command prompt: > > AL /t:lib /embed:WindowsApplication1.Form1.de.resources > /embed:WindowsApplication1.Form2.de.resources /culture:de > /out:WindowsApplication1.resources.dll > > 5. Copy the generated satellite assembly > 'WindowsApplication1.resources.dll' into a subdirectory named 'de' under > the folder that the executable resides. > > As you can see, we needn't re-compile the existing WinForm application > project to support another culture. > > Hope this helps. > If you have any question, please feel free to let me know. > > Sincerely, > Linda Liu > Microsoft Online Community Support > > On Nov 1, 4:56 am, David Thielen <thie...@nospam.nospam> wrote:
Show quote > Bingo - exactly what I needed. thanks. Hey guys> > -- > thanks - dave > david_at_windward_dot_nethttp://www.windwardreports.com > > Cubicle Wars -http://www.windwardreports.com/film.htm > > > > "Linda Liu[MSFT]" wrote: > > Hi Dave, > > > Thank you for your reply! > > > Yes, what you expected can be done definitely. > > > In fact, the best practice of localizing a WinForm application is like the > > following: > > > 1. Use VS IDE to create WinForms in the application and make each form > > localizable, i.e. set the Localizable property of the form to true and > > build the WinForm application project. > > > 2. When you want the application support another culture later, you can use > > Windows Forms Resource Editor(Winres.exe) to edit the .resx files, e.g. > > Form1.resx. Translate the resource text into another language, e.g. German, > > and save this resx file in German culture, which produces a Form1.de.resx > > file in the same folder where the Form1.resx resides. > > > 3. Use Resgen.exe tool to convert Form1.de.resx file to > > ProjectNamespace.Form1.de.resources file(Note, the .resources file should > > have a full name so that the resource could be accessed by the executable > > later). For example, type the following command in the VS2005 command > > prompt: > > > Resgen Form1.de.resx WindowsApplication1.Form1.de.resources > > > 4. Bind all .resources files for a specified culture into a statellite > > assembly using AL.exe tool. For example, you create Form1.de.resources and > > Form2.de.resources files, then you need to bind both the two *.de.resources > > files into a statellite assembly for the culture German. For example, type > > the following command in the VS2005 command prompt: > > > AL /t:lib /embed:WindowsApplication1.Form1.de.resources > > /embed:WindowsApplication1.Form2.de.resources /culture:de > > /out:WindowsApplication1.resources.dll > > > 5. Copy the generated satellite assembly > > 'WindowsApplication1.resources.dll' into a subdirectory named 'de' under > > the folder that the executable resides. > > > As you can see, we needn't re-compile the existing WinForm application > > project to support another culture. > > > Hope this helps. > > If you have any question, please feel free to let me know. > > > Sincerely, > > Linda Liu > > Microsoft Online Community Support- Hide quoted text - > > - Show quoted text - localisation does not work when assembly key file is added. please help!!! see the code below code: assembly.cs [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile(@"..\..\Key\Key.snk")] [assembly: AssemblyKeyName("")] localisation: private void LoadLocalizedText(ResourceManager rm) { this.NewString = rm.GetString("NewString"); } the above code works in visual studio 2005 (.net 2.0 ... not sure of visual studio 2003).... i definately need to add the keyfile in the assembly and can not move to visual studio 2005... i am using borland devloper studio 2006 and .net1.1 i have been asking for help in http://newsgroups.borland.com/cgi-bin/dnewsweb?cmd=xover&group=borlan... but its not going anywhere :(((( cryingout loud Please have a look at my test app http://rapidshare.com/files/65203000/testapp.zip and try to compile it in borland developer studio 2006. The satellite assembly will not be strongly named when assemblykey file is used. I am pretty muich struck with it and don't know where to go from here... please help as i can not move to vs.net or .net 2.0. please help sunny |
|||||||||||||||||||||||