You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

Unable to render {include} The included page could not be found.
No files shared here yet.

If you look for internationalization it's common to use the abbreviation i18n. Internatiolization is the topic of translation of messages. If you are interested in using different units, date formats, number notations that's called Localization L10n.

Things to look at:

  • Example .NET applications available with sources where localisation is implemented nicely:
    • SharpDevelop - check user interface translated to many languages
    • Paint.NET
    • MonoDevelop, source code can be checked out using the following command line: svn co svn://anonsvn.mono-project.com/source/trunk/monodevelop monodevelop

Overview Examples


Example

Localization change

Method

Architecture

SharpDevelop

runtime

  • .NET ResourceManager

Paint.NET

restart

  • .NET ResourceManager

MonoDevelop

?

  • written in C/C++
  • getText instead of Resources.
    This allows MonoDevelop to take advantage of
    GNOME translators' familiarity with getText.

?

Spring.Net

runtime
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3da4e35d-428b-4bfd-a020-f252e1eeeba0"><ac:plain-text-body><![CDATA[[web, just 1 page to refresh]

  • [Follows Globalization Architecture .NET

http://msdn2.microsoft.com/en-us/library/aa478974.aspx]]]></ac:plain-text-body></ac:structured-macro>

  • Automatic Localization Using Localizers ("Push" Localization)
  • Working with Localizers $this (form/usercontrol) or $resource_namespace
  • Applying Resources Manually ("Pull" Localization) like getMessage("labelName");

-

MonoRail

runtime
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3d2fc1ee-dc42-437a-b6bf-08922c40efd9"><ac:plain-text-body><![CDATA[[web, just 1 page to refresh]

  • .NET ResourceManager
  • [Facade ResourceManager

^Architecture_MonoRail_Resources.png]]]></ac:plain-text-body></ac:structured-macro>

Singleton versus Static Class

  • In C#, Singleton class as the name implies creates only one instance of the class and its member, whereas, static class creates a new instance of the static members everytime it is being accessed.
  • Adds a level of indirection. This allows the creation of more than one instance of the class at a later date without breaking client code.
  • Encapsulates data and methods into a separate namespace, the singleton class.
  • Allows sub-classing.
  • Provides access control to the single instance.
  • Thread safe.

Gena, would you like to comment/check "Singleton versus Static Class"? Thanks, Alex.

Overview Methods


Method

Maintenance

Remarks

Resources (.NET)

Satellite assembly: editors -Zeta Resource Editor,Resource Builder

  • Resources (.NET) not only text, also images, files etc.
  • Resources (.NET) can also be used for redesign/culture (location/Size)
  • Resources (.NET) indexed on labels or control names

gettext

kbabel gettext editor

  • indexed on content (hard coded)
  • gettext generate a indexlist on 'run'

DelftLanguage

text-files(lng)

  • dll
  • parsing all controls of forms
  • indexed on content

Suggestion


Architecture
Work method

  • Automatic Localization Using Localizers = property window Visual Studio [resource on class (Form/UserControl)s level]

  • Applying Resources Manually = resourceService.getString(indexname) for using the Lookup hierarchy.

Lookup hierarchy

  • Class (Form/UserControl) languagecode-country/regioncode
  • Class (Form/UserControl) languagecode
  • Application (Plugin) languagecode-country/regioncode
  • Application (Plugin) languagecode
  • DelftShell (DelftShell.Resource, a new project in DelftShell for all common translations like save, delete, remove etc.) languagecode-country/regioncode
  • DelftShell (DelftShell.Resource, a new project in DelftShell for all common translations like save, delete, remove etc.) languagecode

Maintenance

Remarks


  • Resources and WPF: msd2 (still based on Satellite Resource.dll's]
  • No labels