Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current CultureInfo/Localization

//
cultureInfoUI of the UserSettings from DelftShell.Gui (Properties.Settings which appears finally in the app.config) set the current CultureInfo/Localization to the given value of this parameter. This UI localization will be set for the DelftShell thread (Thread.CurrentThread.CultureInfoUI). For this moment all Plugins are running within this thread. //

IApplication.Resources

//
DelfShell.GUI.DelftShellGUI sets the Properties.Resources of DelfShell.GUI to IApplication.Resources of DelfShell.Core.DelftShellApplication.
//

IPlugin.Resources

...

DelfShell.Core.DelftShellApplication initialises all plugins and sets the Properties.Resources of the plugin to IPlugin.Resources //

Log4net

//
best idea for localization Log4Net
In DelftShell.Gui.Forms.MessageWindow.MessageWindowLogAppender we could translate the message and make a catalogue in the app.config of the plugins. Still to do some tests/research like performence/threadsafe, how to get the parameters of string.format of the message etc. It would be nice the next version of Log4Net will include a decent solution.
//

Available Languages

//
The available culture depended Resources in DelfShell.GUI.Properties.Resources are bound to the list in Menu->Tools->Options->General->Language
//

Menu

//
DelftShell.Gui.PluginConfigurator reads the plugin configuration from the app.config of the plugin. MenuItems of the plugin are added to the mainmenu. Firstly, the text of the MenuItems will be lookedup in IPlugin.Resources then in IApplication.Resources with parameter MenuItem.Name. If not found the default text in app.config will be set. //

Build and Location resources.dll's

//
The culture depended Resources.dll will be located in bin\debug\<culture-country>\Resources.dll.
With a Post-Build script of the plugins the dll's and folder have to be copy to DelftShell.Loader\bin\plugins\<plugin>\<culture-country>\Resources.dll //

Issues to resolve

  • Log4net and DelftShell.Gui.Forms.MessageWindow
  • Plugin can set the currentUICulture
  • Thousand and decimal points-commas of the different cultures and problems with string-double conversions etc.
    //

Suggestions

...

It would be handy to centralise all resources in DelftShel.Resources and <Plugin>.Resources. It will be easier to maintenance all resources and texts and it will not be necessary to build the whole solution for a little text change. Also for a setup it will be easier to include all needed files. Designers and Translators can do there job without any knowledge of the program.

...

Maintenance