6
28 maart 2008 DelftTools & DelftShell - GUI 1 Internationalization & Localization Collection UI objects depending on CultureInfo . MessageBox . Windows.Forms.Controls . ToolTips . MenuItems . ContextMenu . LogMessages (log4net) . Helpfiles .

28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

Embed Size (px)

Citation preview

Page 1: 28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

28 maart 2008DelftTools & DelftShell - GUI 1

Internationalization & Localization

Collection UI objects depending on CultureInfo

. MessageBox

. Windows.Forms.Controls

. ToolTips

. MenuItems

. ContextMenu

. LogMessages (log4net)

. Helpfiles

. …

Page 2: 28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

28 maart 2008DelftTools & DelftShell - GUI 2

Internationalization & Localization

Culture change runtime vs Restart

. Culture change runtime needs an update for all windows.form.controls (parsing all controls or IView,IViewcontrol with CultureUpdate() method)

Page 3: 28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

28 maart 2008DelftTools & DelftShell - GUI 3

Internationalization & Localization

Resources vs gettext

. Resources includes possibilities for culture depended images,files, layout properties like location and size

. gettext is not parameterised (content/text is match), ResourceManager of resources are parameterised (open or ‘controlpath’)

. gettext generate a catalogue during runtime.

. Resources have editors, based on satellite assemblies of the resources

. gettext <-> resource.dll exchange seems to be possible

Page 4: 28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

28 maart 2008DelftTools & DelftShell - GUI 4

Internationalization & Localization

Resources “all over the place”

. Often choosen for an extra project “Resource” to centralize resources

. Suggestion DelftShell.Resource project

. Lookup hierarchy:

. Extentions on this idea:1. DelftShell.Resource contains ‘design/skin’ data

2. Decoration Pattern for Forms and UserControls to add skin

3. If we allready parse controls to add skin, we could use this also for culture change

Forms/UserControle Resources

Plugin Resources

DelftShell.Resources

Page 5: 28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

28 maart 2008DelftTools & DelftShell - GUI 5

Internationalization & Localization

Style:

. Resources:ResourceManager rm = new ResourceManager();

Label.Text = rm.GetString("Hello");

Label.Text = rm.GetString("frmWelcome.pnlHeader.lblHello.Text");

. gettext:printf( gettext( "Hello, world!\n" ) );

. log4net:

log.warn("Hello, world");

<message match="Hello, world"> <translation xml:lang="fr">Bonjour de monde</translation>

</message>

Page 6: 28 maart 2008DelftTools & DelftShell - GUI1 Internationalization & Localization Collection UI objects depending on CultureInfo. MessageBox. Windows.Forms.Controls

28 maart 2008DelftTools & DelftShell - GUI 6

Internationalization & Localization

Something totally different:

. Consistent look & feel Delftshell and plugins

UI based on ‘MasterForms’ or ’Templates’ (designer/AVD) Special designed UserContols (designer/AVD) Better ideas….?