Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Whidbey - beta1 - "Beta period has expired!!!" Pin
Koushik.roy@rbc.com31-Mar-05 10:33
Koushik.roy@rbc.com31-Mar-05 10:33 
GeneralQuestion on File.Copy Pin
RockRock31-Mar-05 3:42
RockRock31-Mar-05 3:42 
GeneralRe: Question on File.Copy Pin
Colin Angus Mackay31-Mar-05 4:28
Colin Angus Mackay31-Mar-05 4:28 
GeneralRe: Question on File.Copy Pin
RockRock31-Mar-05 4:35
RockRock31-Mar-05 4:35 
GeneralRe: Question on File.Copy Pin
Colin Angus Mackay31-Mar-05 4:39
Colin Angus Mackay31-Mar-05 4:39 
GeneralRe: Question on File.Copy Pin
Dave Kreskowiak31-Mar-05 5:59
mveDave Kreskowiak31-Mar-05 5:59 
GeneralEasy Translation!! Pin
Diogo Alves31-Mar-05 3:38
Diogo Alves31-Mar-05 3:38 
GeneralRe: Easy Translation!! Pin
Heath Stewart31-Mar-05 6:48
protectorHeath Stewart31-Mar-05 6:48 
Not translation, no, but localization and globalization, yes. Read Developing World-Ready Applications[^] in the .NET Framework SDK for detailed information. ResX files are actually better than string tables because you can store more than just strings. Even something as simple as string formatting is better in .NET because you can specify which arguments go where in a string, meaning that you can localize the format string but still specify the parameters in the same order for any language. See my article, Custom String Formatting in .NET[^], for a discussion about this.

If you're using Visual Studio .NET to develop your managed applications, developing world-ready applications could be much easier. Design your UI and all the text, the select the form and open the PropertyGrid (should already be open; otherwise, right-click and select "Properties"). Find the "Localizable" property and set it to "True", then find the "Language" property and set that to another language. You can then change your strings, control sizes and locations, and more.

A few things to keep in mind. The neutral language - the language in which you develop and that the primary assembly (the assembly with code) uses - should not be localized separately. This is also the fallback language if a satellite assembly cannot be found. This is covered in the documentation I linked first. To make your application run faster, you should put the following attribute in your AssemblyInfo.cs file (or anywhere, actually, but that source file is most common):
[assembly: System.Resources.NeutralResourcesLanguage("en-US")]
Here, my neutral language would be "en-US" (English (U.S.)) because that's the language in which I developed the primary assembly. I could then switch to "German" (for an invariant locale, which means I'm just localizing the German language but not for a particular region) and change my UI. When you compile, several assemblies are produced. You must ship all to have your localized UI displayed correctly.

The localized UI is controlled by the Thread.CurrentUICulture. Windows will set the thread's LANGID (the CurrentUICulture) to the user's preferred (or the system's default) LANGID, but you can override that by setting Thread.CurrentUICulture before displaying your UI.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralDrawing one point Pin
Kiki9931-Mar-05 2:58
Kiki9931-Mar-05 2:58 
GeneralRe: Drawing one point Pin
S. Senthil Kumar31-Mar-05 3:04
S. Senthil Kumar31-Mar-05 3:04 
GeneralRe: Drawing one point Pin
Kiki9931-Mar-05 3:29
Kiki9931-Mar-05 3:29 
GeneralWeb Services - c# application Pin
wakkerjack31-Mar-05 1:51
wakkerjack31-Mar-05 1:51 
GeneralRe: Web Services - c# application Pin
Kodanda Pani31-Mar-05 2:09
Kodanda Pani31-Mar-05 2:09 
GeneralMemmory mapping in C# Pin
Themis31-Mar-05 1:01
Themis31-Mar-05 1:01 
GeneralQuery Engine Error Pin
dotnetquery31-Mar-05 0:26
dotnetquery31-Mar-05 0:26 
GeneralProblem reading process.standardout Pin
CoffeeZombie31-Mar-05 0:11
CoffeeZombie31-Mar-05 0:11 
GeneralRe: Problem reading process.standardout Pin
Sebastian Schneider31-Mar-05 0:43
Sebastian Schneider31-Mar-05 0:43 
GeneralRe: Problem reading process.standardout Pin
Sebastian Schneider31-Mar-05 0:48
Sebastian Schneider31-Mar-05 0:48 
QuestionHow to obtain the server name of the one machine or the office land online SQL SERVER200 0 Pin
prochf31-Mar-05 0:07
prochf31-Mar-05 0:07 
AnswerRe: How to obtain the server name of the one machine or the office land online SQL SERVER200 0 Pin
prochf31-Mar-05 20:12
prochf31-Mar-05 20:12 
GeneralNeed code of email verification in win form Pin
oohungoo30-Mar-05 22:48
oohungoo30-Mar-05 22:48 
GeneralRe: Need code of email verification in win form Pin
Dave Kreskowiak31-Mar-05 5:48
mveDave Kreskowiak31-Mar-05 5:48 
GeneralRe: Need code of email verification in win form Pin
oohungoo31-Mar-05 22:27
oohungoo31-Mar-05 22:27 
GeneralRe: Need code of email verification in win form Pin
Dave Kreskowiak1-Apr-05 2:03
mveDave Kreskowiak1-Apr-05 2:03 
Questionhow convert matlab to C# windows application Pin
audaialghzawi30-Mar-05 21:58
audaialghzawi30-Mar-05 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.