I am currently evaluating SmartGWT for our company's project. One of the requirements for our project is localization (i18n). I checked the reference for SmartClient 6.5.1 and found following code:
However, I am not sure how to do the same thing with SmartGWT. Let's take ListGrid for example where ListGrid has sortFieldAscendingText and sortFieldDescendingText (i18nMessages). I can write following code:
However, I can not localize ListGrid through the class level where I only need to set the localization property one time and subsequence of the initialization of the object will be automatically localized. By the way, GWT has really great localization mechanism where the localization property files can be defined. Is it possible that we can localize SmartGWT default components (ListGrid for example) through the property files? For example, based on the source code of ListGrid.js (the base of ListGrid of SmartGWT):
Does SmartGWT provide a way that we can just modify property files and those default values will just be overwritten?
Anyway, if we have to localize SmartGWT default components from object level, then it will be very inefficient from coding point of view.
Thanks
Code:
isc.RPCManager.addClassProperties({timeoutErrorMessage:"Custom Timeout Message"});
Code:
final ListGrid countryGrid = new ListGrid(); countryGrid.setSortFieldAscendingText("Asc Localize"); countryGrid.setSortFieldDescendingText("Desc Localize");
Code:
//> @attr ListGrid.sortFieldAscendingText (string : "Sort Ascending" : IRW) // If we're showing a +link{listGrid.showHeaderContextMenu,headerContextMenu} for this grid, this // attribute will be shown as the menu item title to sort a field in ascending order. // @group i18nMessages // @visibility external //< sortFieldAscendingText: "Sort Ascending", //> @attr ListGrid.sortFieldDescendingText (string : "Sort Descending" : IRW) // If we're showing a +link{listGrid.showHeaderContextMenu,headerContextMenu} for this grid, this // attribute will be shown as the menu item title to sort a field in descending order. // @group i18nMessages // @visibility external //< sortFieldDescendingText: "Sort Descending",
Anyway, if we have to localize SmartGWT default components from object level, then it will be very inefficient from coding point of view.
Thanks
Comment