I get an error when i start to iterate thru the filename "..\Resources\\UltraChart\\ChartCore\\strings.resx"
ResX file Type System.Drawing.Bitmap, System.Drawing in the data at line 826, position 4 cannot be located. Line 880, position 5. cannot be parsed.
_reader = new ResXResourceReader(filename);
{
rc.SetCustomizedString(entry.Key.ToString(), entry.Value.ToString());
}
although i don't understand 100% what you're doing, i think your approach is sound for all those controls... but as you may have noted the WinChart doesn't have a resource customizer. the chart control works independently from the other WinForms controls, and it doesn't use this pattern for its string resources.
you should find that all strings displayed in the chart are adjustable through a property setting, though.
i think the issue related to parsing the chart's strings.resx is not relevant, since for the chart control this solution won't have any effect.
Sadly infragistics doesn't have an 'easy' way to load culture specific languages, i though just taking the source and for each .resx it would be possible, but i guess it isn't :)
Can someone tell me if i'm doing it correct below?
PS: ParseResource is a method in which a class is being called that uses the ResXResourceReader to iterate thru an culture specific resx.
ParseResource(@"Resources\Common\Infragistics.Shared\strings.resx", Infragistics.Shared.Resources.Customizer);
ParseResource(@"Resources\SupportDialogs\strings.resx", Infragistics.Win.SupportDialogs.Resources.Customizer);
ParseResource(@"Resources\UltraWinDataSource\strings.resx", Infragistics.Win.UltraWinDataSource.Resources.Customizer);
ParseResource(@"Resources\UltraWinEditors\strings.resx", Infragistics.Win.UltraWinEditors.Resources.Customizer);
ParseResource(@"Resources\UltraWinGrid\strings.resx", Infragistics.Win.UltraWinGrid.Resources.Customizer);
ParseResource(@"Resources\UltraWinListView\strings.resx", Infragistics.Win.UltraWinListView.Resources.Customizer);
ParseResource(@"Resources\UltraWinPrintPreviewDialog\strings.resx", Infragistics.Win.Printing.Resources.Customizer);
ParseResource(@"Resources\UltraWinSpellChecker\strings.resx", Infragistics.Win.UltraWinSpellChecker.Resources.Customizer);
ParseResource(@"Resources\UltraWinTabbedMdi\strings.resx", Infragistics.Win.UltraWinTabbedMdi.Resources.Customizer);
ParseResource(@"Resources\UltraWinToolbars\strings.resx", Infragistics.Win.UltraWinToolbars.Resources.Customizer);
ParseResource(@"Resources\UltraWinTree\strings.resx", Infragistics.Win.UltraWinTree.Resources.Customizer);
the resx is valid for our purposes; i've never seen a scenario where an application tried to parse through it. i don't think the ResourceCustomizer from Infragistics.Shared was designed to work with the chart.
if you are using your own copy of the resx file, maybe you can just remove the offending bitmap resource and try again? i don't think this code can effectively change the resource strings for the chart, though...