Propert圜hanged( this, new Propert圜hangedEventArgs ( "LocalizationResources" )) Public event Propert圜hangedEventHandler Propert圜hanged Public class ObservableResources : INotifyPropert圜hanged It starts with a class that I call ObservableResources: I came up with a solution that addresses all of these issues and that so far has proven to be reasonably maintainable and robust. It beats me why this hasn’t been fixed after all these years, but it hasn’t.
Visual studio resx localization currentculture code#
This means that whenever you modify the primary RESX file, forcing a code regen, you have to manually change internal to public on the constructor in the generated code. Finally, Visual Studio suffers from a long-standing bug that leaves the constructor of the ResourceManager wrapper class it generates marked internal when you change the class’s access modifier to public. (A user who prefers to see content in French probably has no need to see it in Manadarin Chinese, too.) For another, you often need the ability to switch between languages at run-time so you can present a list of language choices to the user and immediately switch to the language they selected. That’s wasteful, because for a given user, you probably only need one of those satellite assemblies. For one thing, all the satellite assemblies built from the RESX files are packaged in the application’s XAP file, meaning the XAP can grow quite large. It works, but it has always left a bad taste in my mouth. There are many ways to do it, but most solutions that I’ve seen use some variation of the technique described in the Silverlight documentation, which puts localization resources in RESXes and uses data binding to bind XAML elements to localized resources. Localization is (and has always been) a hot topic in Silverlight.