Davletvm / soashable

Automatically exported from code.google.com/p/soashable
0 stars 0 forks source link

Add i18n support #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Internationalization
- support for everybody
- message bundles
- look into cross-browser compatibility of using DTD's and using entities
similar to how Firefox extensions support i18n

Original issue reported on code.google.com by ces....@gmail.com on 21 Sep 2007 at 11:58

GoogleCodeExporter commented 9 years ago

Original comment by h.iver...@gmail.com on 23 Jan 2008 at 6:20

GoogleCodeExporter commented 9 years ago
started. see Application Design page for up to date info on implementation.

http://labs.devspan.com/soashable-web/app-design.html

======= current version =========

Soashable components currently support i18n, but this is only one language. The
pattern is basically this:

 Soashable.Lang.EN = {
   someString = "some string";
 }

 var soashable = new Soashable( {lang: Soashable.Lang.EN} );
 var lang = soashable.getLang(); // returns the language map it was created it

And components should handle language like this:

 Soashable.Dialog.MyDialog = function(config) {
  this.lang = config.lang;
 }

All UI components follow the same model; each instance that is created from 
within
another should be passed a "lang" config option, and use strings provided by it.

This is very elementary and more sophistocated needs will arise as the 
architecture
evolves. Following the above pattern is important though, as it will make 
evolving
much easier.

Original comment by h.iver...@gmail.com on 11 Feb 2008 at 4:18