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 

Previewing forms with Infragistcs controls

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



Joined: 19 Nov 2009
Posts: 13

PostPosted: Wed Feb 03, 2010 6:24 pm    Post subject: Previewing forms with Infragistcs controls Reply with quote

I'm evaluating Globalizer and as far as I can tell it fills almost all our needs. One nuisance though, is that the Preview panel can't show the translated resources corresponding to Infragistics controls. The Output panel reports error "E206" on those properties.

We heavily use Infragistics WinForms controls on our projects and it would be nice if a third party translator can preview his/her work.

Is there anything we can do on those extended properties? Are there any workarounds?

Regards,
-Hernán.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Feb 03, 2010 9:40 pm    Post subject: Reply with quote

I think this is probably happening because Infragistics use a non-standard coding technique to handle properties. If you can put together a small sample project and Globalizer.NET workspace that demonstrate the particular problems you are encountering and email it to support@infralution.com then we will take a look at the issue and see if we can do something about this.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Hernan Martinez



Joined: 19 Nov 2009
Posts: 13

PostPosted: Thu Feb 04, 2010 11:29 am    Post subject: Reply with quote

Thanks for the fast response.
I'll build a project and send it to you via email.
Regards,
-Hernán.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Feb 08, 2010 1:13 am    Post subject: Reply with quote

Thanks for the sample project. The problem is that the way that Infragistics are serializing the resources for the grid and tab is not the standard approach for .NET controls.

To enable dynamic changing of the resources for a UI object on the form Globalizer.NET locates the associated member variable that is usually created by the designer for the object and then parses the resource key to determine the property that needs to be set. The problem is the Infragistics designer serializer does not create member variables for TabPages (UltraTab objects) and column headers (ColumnHeader) - instead it creates local variables in the InitializeComponent method and then adds the objects to collections. While this technique is not wrong it does make it difficult to access the properties of these objects programmatically and provides no hook for Globalizer.NET to set the properties dynamically.

I found a possible workaround for Ultra tab pages. By defining a member variable that matches the local variable/resource name used in the InitializeComponent method you can enable Globalizer.NET to dynamically change the properties for the object eg

Code:
      // member variables defined to match resources in InitializeComponents
        private UltraTab ultraTab1;
        private UltraTab ultraTab2;
 
        public Form1() {
            InitializeComponent();
            ultraTab1 = ultraTabControl1.Tabs[0];
            ultraTab2 = ultraTabControl1.Tabs[1];
        }


Because the serializer doesn't create member variables for the UltraTab objects you have to access them programmatically through the Tabs collection. Unfortunately the only way I could find to do this was with a numeric indexer - which probably is not very robust if you change the tab order.

The serialization they use for the column headers is even more non-standard. They generate resource names like "resource.Caption", "resource.Caption1" etc and there is no way to change these. This means that the workaround above won't work for Grid column headers.

While your translator won't be able to dynamically preview these properties in the Globalizer.NET preview pane, if they build the localized satellite assemblies they will be able to see them fully translated when they run the application.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Hernan Martinez



Joined: 19 Nov 2009
Posts: 13

PostPosted: Mon Feb 08, 2010 12:08 pm    Post subject: Reply with quote

Thanks a lot for the detailed explanations. I was afraid that it had something to do with the way Infragistics does their things.

I didn't mentioned in my OP but I were testing Globalizer version 2.0.4 which I had downloaded some weeks ago.

Just for the sake of trying I've just installed version 2.1.1 of the Translator tool to see if we can see something new in this regard but it doesn't. Actually, version 2.0.4 had something interesting (probably an unintended side effect, gone in the new version) which was that if I set either the Tool language or the OS language to the foreign language it was possible to see the form in the preview panel translated completed including those problematic resources. If I change the text, quit the program tool (in 2.0.4 the resource was blocked), run it again, build the resource, the new labels are shown in the preview. But this workaround doesn't work in 2.1.1.

Some may find useful an option to preview forms in a non-on-the-fly way. Like run "set language-save-rebuild-reload-run constructor-show" as a last resort. Could a feature like that be possible?

Either way, thanks a lot.

Regards,
Hernan Martinez
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Feb 08, 2010 9:24 pm    Post subject: Reply with quote

You are right. We fixed a bug in version 2.1 that meant that if you changed the Globalizer.NET UI language it affected the previews. While this may have helped somewhat in your particular case in other cases it could cause incorrect layout or resources to be displayed.

We will continue to look for a solution for this issue.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
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