Hello,
I have created a more complex windows form with some ultragrids, infragistics menu and statusbar as well as ultraview and buttons.
During my first development step, the language remained in "(Default)" within property group "Design" of my windows form (which itself is inheritated from another form). All the control captions and texts were maintained in english as my default language.Now I have changed from (Default) to GERMAN. The resource file with extension .de.resx was created. I have maintained all captions and texts in german for the same controls. The german resource file contains all captions and texts in german. If I switch to (Default), the texts and captions are mixed together, nothing is still in the same sequence as before.
For instance the captions for the first five menu items (labels) are shifted so menu text of item 2 becomes menu text of item 1, three becomes two and so on. If I correct the default version and switch back to german, the chaos in the german version begins.
I found that depending on the control, this text/caption will be shifted to the next caption. The logic is not visible for me.This error does not occur in all of my forms, so it is maybe related to the complexity of the current windows form.
I also tried to reset the english texts/captions with (Default) settings, finally switched to version ENGLISH in order to maintain the texts in english once more, so I have three resource files now (english, german, default). But whatever I maintain, the version I will open next is getting its texts and captions in a complete another sequence.
Does anyone have the same issue with localisation of Infragistic controls? Or is it a general Visual Studio 2008 issue? I had this problem by the way with VS 2005 already.
I've seen this issue come up a few times. It's a problem with how Visual Studio associates resources to any property that is a "collection within a collection" - something that's common throughout many of our Windows Forms controls, including WinGrid, WinToolbarsManager, and WinStatusBar. This has affected every version of Visual Studio for .NET: 2002, 2003, 2005, and 2008. I can't find it now, but at one point I'd seen a way to create a relatively simple control (not an Infragistics control) with a "collection within a collection" property, which encountered the same behavior.
If I recall correctly, when you try to localize your form at design-time Visual Studio can only associate resources to properties inside collections by their index. The design-time localization process can't associate resources by a Key or any other property which may be unique for any one item in a collection. The way the items in collections are serialized to the Windows Forms Designer means that the indexes of any individual item may change in a manner which can't be controlled. When the indexes change in this fashion, then the localized strings you stored no longer match up to the right items.
The best solution I know of is to add your strings to your specific-culture resource file manually, and to associate those strings back to the appropriate items using code. This way, you're not dependent on the index of each item, and can be sure you're associating the correct string to the correct item. You can, of course, continue to use the design-time localization process for any properties that aren't kept within collections.