Date post: | 05-Jan-2016 |
Category: |
Documents |
Upload: | stephen-golden |
View: | 218 times |
Download: | 1 times |
28 maart 2008DelftTools & 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 - 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)
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
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
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>
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….?