Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issue with nested Property&CultureManager.ApplyResources

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support
View previous topic :: View next topic  
Author Message
sheitman



Joined: 27 Apr 2010
Posts: 98

PostPosted: Fri Oct 01, 2010 3:14 pm    Post subject: Issue with nested Property&CultureManager.ApplyResources Reply with quote

Hi there,
me again. Smile

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Oct 01, 2010 10:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sheitman



Joined: 27 Apr 2010
Posts: 98

PostPosted: Mon Oct 04, 2010 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Oct 04, 2010 9:51 pm    Post subject: Reply with quote

The code hosted on Code Project is up to date. You can also download the source code and sample projects from the following links:

www.infralution.com/downloads/CultureManager.zip
www.infralution.com/downloads/EnumLocalization.zip
www.infralution.com/downloads/WpfLocalization.zip
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
sheitman



Joined: 27 Apr 2010
Posts: 98

PostPosted: Tue Oct 05, 2010 7:23 am    Post subject: Reply with quote

Thank you very much Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group