Click here to Skip to main content
15,899,935 members
Home / Discussions / C#
   

C#

 
GeneralTcpChannel and authentication Pin
Bjoern.adG20-Dec-04 20:39
Bjoern.adG20-Dec-04 20:39 
GeneralRe: TcpChannel and authentication Pin
Skynyrd20-Dec-04 21:06
Skynyrd20-Dec-04 21:06 
GeneralExtending Folder properties Pin
umeshb20-Dec-04 20:02
umeshb20-Dec-04 20:02 
GeneralRe: Extending Folder properties Pin
Heath Stewart20-Dec-04 21:58
protectorHeath Stewart20-Dec-04 21:58 
QuestionMultiligual and End-User defined labels...? Pin
Darren Weir20-Dec-04 18:35
Darren Weir20-Dec-04 18:35 
AnswerRe: Multiligual and End-User defined labels...? Pin
Sven Cipido20-Dec-04 20:29
Sven Cipido20-Dec-04 20:29 
GeneralRe: Multiligual and End-User defined labels...? Pin
Darren Weir20-Dec-04 23:42
Darren Weir20-Dec-04 23:42 
AnswerRe: Multiligual and End-User defined labels...? Pin
Heath Stewart20-Dec-04 21:46
protectorHeath Stewart20-Dec-04 21:46 
You should start by reading Developing World-Ready Applications[^] in the .NET Framework SDK.

You should also understand the difference between globalization and localization, the former being how dates, times, and numbers are formatted, while the latter is how text is read according to the current language. Respectively, each is represented by CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture, which could easily be different.

Developing a world-ready application using VS.NET is very easy. Develop your user interface, then use the PropertyGrid with the entire Form selected to set "Localizable" to true, then select the language. The neutral language is in whatever language you've developed the application (like "en-US" for U.S. English), so do not use that language. The neutral text will be compiled into resource files and embedded into your primary assembly (the assembly with the IL module(s) that is your compiled code), while any other languages are compiled into satellite assemblies. To make look-ups faster, you should define for your assembly an assembly-level attribute named NeutralResourcesLanguageAttributE using the locale/language in which you developed your application originally, like so:
[assembly: NeutralResourcesLanguage("en-US")]
This will save a separate look-up for satellite assemblies when that particular language is the current locale and language. This is especially important if you're deploying your managed code via touchless deployment over the web.

I architected a solution using this concept, though I didn't use VS.NET because it's rather inefficient for enterprise applications. This will be greatly improved in Visual Studio 2005 using the ComponentResourceManager instead of the ResourceManager at design-time. Both classes have been defined since .NET 1.0, but the designer - up until VS 2005 - has been using the ResourceManager which can bloat your codebase by localizing every property attributed with the LocalizableAttribute, which is quite a few.

Even after compiling, either you or your clients can use the Winres.exe[^] tool. This only works if you use VS.NET's localization designer, or hack your .ResX files to make it look like VS.NET created the files.

There are a few articles on localization here on CodeProject, so I urge you to also search for them. For just localizing an application, however, it's quite easy. Use the VS.NET designer to localize an application and view what the designer did (it is, after all, just code and XML files (.ResX files, which are compiled into .resources files using the same functionality as the command-line tool resgen.exe). To make it easier, show all hidden files by clicking on the "Project" menu, then "Show Hidden Files" (or something similar to that).

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]
GeneralRe: Multiligual and End-User defined labels...? Pin
Darren Weir20-Dec-04 23:57
Darren Weir20-Dec-04 23:57 
GeneralRe: Multiligual and End-User defined labels...? Pin
Sven Cipido21-Dec-04 1:11
Sven Cipido21-Dec-04 1:11 
GeneralRe: Multiligual and End-User defined labels...? Pin
Heath Stewart21-Dec-04 7:46
protectorHeath Stewart21-Dec-04 7:46 
Generalon SQL Server CE Pin
ting66820-Dec-04 17:39
ting66820-Dec-04 17:39 
GeneralRe: on SQL Server CE Pin
Heath Stewart20-Dec-04 21:21
protectorHeath Stewart20-Dec-04 21:21 
GeneralExtend window control as custom control problem Pin
ting66820-Dec-04 17:19
ting66820-Dec-04 17:19 
GeneralRe: Extend window control as custom control problem Pin
Heath Stewart20-Dec-04 21:30
protectorHeath Stewart20-Dec-04 21:30 
GeneralPlatform independant... Pin
Malcolm Smart20-Dec-04 10:45
Malcolm Smart20-Dec-04 10:45 
GeneralRe: Platform independant... Pin
Nick Parker20-Dec-04 10:55
protectorNick Parker20-Dec-04 10:55 
GeneralSerializing the Forms Pin
Wail A.Salem20-Dec-04 10:28
Wail A.Salem20-Dec-04 10:28 
GeneralRe: Serializing the Forms Pin
Heath Stewart20-Dec-04 21:34
protectorHeath Stewart20-Dec-04 21:34 
GeneralDataGrid DoublClick dos'nt Response Pin
Wail A.Salem20-Dec-04 10:21
Wail A.Salem20-Dec-04 10:21 
GeneralRe: DataGrid DoublClick dos'nt Response Pin
Jay Shankar20-Dec-04 17:20
Jay Shankar20-Dec-04 17:20 
Generalwmi query related Pin
sujithapril20-Dec-04 8:53
sujithapril20-Dec-04 8:53 
GeneralRe: wmi query related Pin
Nick Parker20-Dec-04 10:06
protectorNick Parker20-Dec-04 10:06 
GeneralRe: wmi query related Pin
sujithapril20-Dec-04 10:57
sujithapril20-Dec-04 10:57 
Generali needwmi Pin
sujithapril20-Dec-04 8:46
sujithapril20-Dec-04 8:46 

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.