Click here to Skip to main content
15,915,336 members
Home / Discussions / C#
   

C#

 
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 
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 
What you send to the translators doesn't necessarily have to be what you compile into resource files, so do whatever makes it easier. Since they are XML files (and you can also use plain text files using key=value pairs, but then you can only localize strings and not any Type that is attrbuted with a specific TypeConverter), you can do just about whatever you want.

When you compile the resource files, however, they must be compiled into separate satellite assemblies. These satellite assemblies are identified by a specific culture.

Take a fully-qualified assembly name:
System, culture=neutral, version=1.0.5000.0, publicKeyToken=b77a5c561934e089
Notice the neutral? Primary assemblies (those assemblies that contain the IL module(s)) must always be neutral (but can contain your neutral language, which is why I mentioned using the assembly-level attribute NeutralResourcesLanguageAttribute for faster look-ups). Satellite assemblies replace "neutral" with whatever locale/language for which they were compiled.

Both the ResourceManager and the ComponentResourceManager (which extends the former) look-up resources in satellite assemblies using this information. You could create your own resource manager classes to look for resources in a single assembly, but there's so many problems with that.

It's inflexible and bloats the size of your assemblies when N-1..3 languages are necessary for any particular user (1..3 denotes cases when have locale-specific resources, which fallback to language-specific resources, which fallback to neutral resources). You also loose the ability to integrate with visual designers, unless you plan on implementing your own plugins for each designer instead of making the designers work for you (which is how the ComponentModel currently works).

Be sure to read-up on the classes I've mentioned as well as the links I gave you. It explains a lot of information.

Just going through an example of localizing a simple sample application and examining the code really helps, too. Create a new project, throw some controls on the form, assign some text, then localize it using the steps I've mentioned. Examine the source, compile the project, and examine the output. You can learn a lot from such an example.

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]
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 
QuestionHow to start a form from another thread Pin
SebbaP20-Dec-04 8:12
SebbaP20-Dec-04 8:12 
AnswerRe: How to start a form from another thread Pin
Michael Potter20-Dec-04 9:29
Michael Potter20-Dec-04 9:29 
GeneralRe: How to start a form from another thread Pin
SebbaP20-Dec-04 10:33
SebbaP20-Dec-04 10:33 

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.