Resource localization

M

MrAsm

Hi,

what is the C# equivalent of language-specific resource DLLs of the
MFC/C++ world?
With C++/MFC it's possible to build GUIs localized for different
languages, and then dynamically load the specified GUI for a given
language.

But it seems to me that C# and .NET don't use resources e.g. to
describe the UI, like Win32/MFC programs; in C# it seems that GUI
description is mixed together with source code.

Is there a way to split GUI resource description from the source code,
and to dynamically load the desidered resource?

Thanks in advance
MrAsm
 
C

Clive Dixon

MrAsm said:
Hi,

what is the C# equivalent of language-specific resource DLLs of the
MFC/C++ world?
With C++/MFC it's possible to build GUIs localized for different
languages, and then dynamically load the specified GUI for a given
language.

But it seems to me that C# and .NET don't use resources e.g. to
describe the UI, like Win32/MFC programs; in C# it seems that GUI
description is mixed together with source code.

Is there a way to split GUI resource description from the source code,
and to dynamically load the desidered resource?

Thanks in advance
MrAsm

Yes. If you set Localizable = true on your form, the values of all
properties marked as [Localizable] (which is most properties on a standard
form) will have their values stored in a separate resource file for each
language rather than in the source code. The default language resource will
be compiled into the main assembly, and for all the other languages,
"satellite assemblies" will be created containing the localised resources.
The correct resource values will be loaded automatically by the framework
based on the current culture.

Start at http://www.microsoft.com/globaldev/getwr/dotneti18n.mspx and follow
the links for .NET localisation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top