PDA

View Full Version : BREAKING CHANGE: Spring.Web Localization


Aleks Seovic
10-10-2005, 12:58 AM
For better or worse, I had to make some breaking changes to Spring.Web localization implementation.

I believe they were worthwhile, but it means that you will have to modify your resource names in order for them to be applied properly by the localizer. You will also need to create an object definition for the localizer and inject it into your pages for *any* resources to be automatically applied.

As far as resource names are concerened, you will basically have to prefix with '$this' all resources that should be auto-applied by the localizer. This was done in order to allow addition of resources that should not be automatically applied to a local resource file.

Page/UserControl.GetMessage method will now look up resources in the local resource file first, and then fall back to a global message source if the local resource cannot be found.

Latest changes will also allow us to use storage mechanisms other than embedded resource files in the future, such as XML files, flat name-value pair files, databases, etc. It also allows you to plug in your own proprietary resource store.

Another new feature is support for image localization.

You can read the details on the wiki (http://opensource2.atlassian.com/confluence/spring/display/NET/Spring.Web+Localization)

Regards,

Aleks