Hi,
I try to translate the Wingrid to german. I use the ResourceCustomizer and the following code:
public static void SetCustomStrings(ResourceCustomizer rc){
rc.SetCustomizedString("AccessibleActionPush ","Drücken"); rc.SetCustomizedString("AccessibleName_AddNewBoxArea ", "HinzufügenNew Area"); rc.SetCustomizedString("AccessibleName_AddRow ", "Zeile hinzufügen");
...
rc.SetCustomizedString("SummaryTypeMinimum ", "Minimum");rc.SetCustomizedString("SummaryTypeSum ", "Summe");rc.SetCustomizedString("SummaryValueInvalidDisplayFormat ", "Ungültiges Anzeigeformat: {0}. Mehr Info: {1}");
}
The method is called early in the init, but none of the strings in the UltraGrids get replaced. There are still the english strings on the grid. What am I doing wrong? I use 2010.1 and Hotfix 2027.
Hm, that all seems correct, so I'm at a loss to explain this.
Where exactly are you calling this method from? A good place to do this is in the form's constructor immediately after the call to InitializeComponent. That was it sets all the strings before the grid is displayed.
If that doesn't help, perhaps you could post a small sample project demonstrating the behavior and I will be happy to take a look at it for you.
I am calling the method with
Grid.SetCustomStrings(Infragistics.Win.UltraWinGrid.Resources.Customizer);
from the form that holds the Grid.
And I replace every string in the grid, I simply ommited a whole bunch for readability.
The strings you are using here are a pretty odd choice. The "Accessible" strings refer to strings used only by accessibility. So you would never see (or hear) these strings unless you are using some kind of accessibility application like a screen reader.
I believe the SummaryType strings are only displayed on the summary dropdown for a column, so it seems more likely that these would be visible to you, assuming your grid is set up to allow the user to add summaries to the grid.
If that's the case and these are having no effect, then my best guess is that you are using the wrong ResourceCustomizer class. Maybe you are using the customizer of the wrong assembly. But that part of the code is not visible here, so I can't say for sure.
This is driving me nuts. I tried calling the method in various places, still I am unable to replace the default strings. When I try the mehtod on a simple test solution, it works. I have absolutly no clue whats going on....