Hi Kent,
Kent Olsson schrieb:
For everyone who wants to localise the application.
the example doesn't work using the current repository version.
There are some issues: 1. integration of the rendering machine When the locale has been changed, the rendering should take place again on demand. Therefore there must be some kind of integration, controlling the rendering queue. For example all widgets will reload their resources and re-render. 2. The other way, which is not smooth, but which does not need any integration, is to "restart" the application whenever the locale has been changed. 3. or maybe some other idea...a new method..integration. I think alternative 1 is the way to go, because different parts of the application can have a different locale.
Yes I think the same. Alternative #1 is the best.
Where and how would you best like to integrate it Sebastian?
I've currently no idea. I don't know why we need a special layout handling. Each text which will be updating inside a QxLabel for example should result in a rerendering automatically. This should already (hopefully) work well.
Sebastian
Kent ------------------------------------------------------------------------ Testing Locale implementation. The internationalisation is an important feature of a class library. ------------------------------------------------------------------------ The QxLocale class is intended for use to make localization possible for an application. The language, country and a variant can be et for multiple items at the same time with a default locale if necessary. Files ===== QxLocale.js The locale class. QxLocaleManager.js The manager class of the locale. QxResource.js The resource class. Definitions.js The class definitions not yet implemented in the Qooxdoo framework. Locale_1.html The example class. Class Relationship ================== The QxLocaleManager manages the current QxLocale for an application. The QxResource gets the localised data from files by the transport mechanism implemented. Usage ===== The class can be used in any application by adding the following two lines in your code. The Definitions.js file includes the setup of static as well as dynamic variable data for the class to be created, which has not yet been included in the Qooxdoo framework. <script type="text/javascript" src="qooxdoo/source/contributed/locale_olsson/Definitions.js"></script> <script type="text/javascript" src="qooxdoo/source/contributed/locale_olsson/QxLocale.js"></script> <script type="text/javascript" src="qooxdoo/source/contributed/locale_olsson/QxLocaleManager.js"></script> <script type="text/javascript" src="qooxdoo/source/contributed/locale_olsson/QxResource.js"></script> You have to change the path in relation to your own code. The Demo Class ============== Shows creation of a simple frame with a main menu bar, tool bar and a status bar. There is a menu alternative for changing the language of the frame.
------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
