View previous topic :: View next topic |
Author |
Message |
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Fri Oct 01, 2010 3:14 pm Post subject: Issue with nested Property&CultureManager.ApplyResources |
|
|
Hi there,
me again.
I want to use the on-the-fly-language-switching feature and I use your CultureManager Component. Currently I use the version you posted at CodeProject.
I have a Form where I use a KryptonCheckButton wich has a Property named Values wich has several Properties like Text which holds the displayed Text.
I noticed that this Buttons Text is not reloaded when the UICulture changes and did some debugging.
What I found is, that the CultureManager checks the Property Values for readonly, wich it is, and jumps out there. However the real Property is Text, a Property of Value. So I just want to ask if this problem with nested Properties are resolved or still a problem?
This is the name of the RESX Entry for Text
chkbtnConnectionData.Values.Text
and this is the name for an image
chkbtnConnectionData.Values.ImageStates.ImageTracking
Best regards,
Sven |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Oct 01, 2010 10:50 pm Post subject: |
|
|
The CultureManager component is an open source component to provide a workaround for the fact that Windows Forms does not provide any support for changing the culture of a form once it has been loaded. It is designed to automatically handle changing properties based on localized resources where the properties and resources conform to the simple one-to-one mapping that most standard controls use.
It does not currently handle cases where localized properties are stored in a seperate compound object as you are describing. There are two possiblities for you:
1. If this is not a widely used control in your application then you can handle the UICultureChanged event of the CultureManager component on the form and simply set the require properties programmatically based on localized resources.
2. If the control is widely used within your software then you could look at modifying the CultureManager.ApplyResources method to cope with the control. _________________ Infralution Support |
|
Back to top |
|
|
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Mon Oct 04, 2010 1:37 pm Post subject: |
|
|
Hi there,
I used your first option. Wasn't as difficult as I first thougth.
However I more question:
Will you release the source of Infralution.Localization.dll and Infralution.Localization.Wpf.dll with Globalizer Installer?
I know both are also hosted at CodeProject however I am not sure if they are out of date so I'm unsure if I should pick the assemblies of the Globalizer folder or stick with my codeproject version or not.
You mentioned to change the CultureManager so it would recognize additional Controls but I need the source for this of course. And if I want to stick to the latest version I have some problem here.
I also noticed Globalizer adds a reference to the WPF assembly when you integrate the RESX functionality to WPF controls. Same problem again.
What would you suggest?
Regards,
Sven |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
|
Back to top |
|
|
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Tue Oct 05, 2010 7:23 am Post subject: |
|
|
Thank you very much |
|
Back to top |
|
|
|