-
Type:
Feature Request
-
Status: RESOLVED
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Internationalization, Kernel
-
Labels:
-
Previous Issue Keys:KNL-1122
This would be useful to roster2, gb2, datepicker, and other tools and technologies that make heavy use of Javascript. By standardizing around the ResourceLoader insure that functionality like dynamic loading, and anything else that may come along can work consistently across all of Sakai.
One possible solution from Matthew Jones:
I was wondering if it would be easier to just write a simple direct point with custom actions for i18n.so we don't have to keep rewriting this?
Would something like this work? Then the i18n files would just have to be deployed in the usual place.
/direct/i18n/string/bundleName/key (GET) – Returns a specific string json/xml/html encoded
getString(bundleName,key)
{ return ResourceLoader.getBundle(bundleName, getUserPreferredLocale()).getString(key); }/direct/i18n/bundle/bundleName (GET) – Returns all strings in the bundle json/xml/html encoded
getBundle(bundleName)
{ return ResourceLoader.getBundle(bundleName, getUserPreferredLocale()); }There may be some changes needed in ResourceLoader so that a method for getting a bundle by name and locale is available. They are standard methods for ResourceBundle but not ResourceLoader.