Hi,
we're trying to localize our application using translation strings stored in DB. Everything's fine with XamDataGrid and other controls, where we've used ResourceCustomizer class to override the strings.
With Gantt chart, however, I understand that the API is not the same and there's no ResourceCustomizer. I've searched for how to supply a custom Resource file at runtime then, but failed to find "RegisterResources" method, like in some other controls.
So, what would be the recommended way to supply/override translation strings at runtime for Gantt chart?
Regards,
Gediminas.
Hello Martin,
can you please share the relevant code line? The attached sample seems not related to XamGantt.
Is this method also working if I use not the project class but my own class and map it with a ListBackdeProject?
Thanks
Niko
Hello Gediminas,
XamGantt control is cross platform (WPF and Silverlight) and it uses the resource infrastructure that was developed for Silverlight. Therefore, the only way of changing the resource strings for XamGantt is by creating a resource file (resx) and calling Project.RegisterResources method.
Please do not hesitate to ask if you have any other questions on this matter.
Thanks, but the problem is that list of supported languages is dynamic, so we cannot generate static resourve file.
Is there a known way to solve this? Maybe there's a way to have a "proxy" resource?
Hello Gediminas Geigalas,
You could find the default resource strings that you need to change for XamGantt here:
C:\Program Files (x86)\Infragistics\2016.1\WPF\CLR4.0\Bin\InfragisticsWPF4.Controls.Schedules.XamGantt.v16.1.resx
After you find all the resource string names you need and generate your custom resource file based on your data, you could use Project.RegisterResources method and pass in the path to your custom resource file like in the following snippet code:
Project.RegisterResources("WpfApplication1.Resource1", typeof(MainWindow).Assembly);
I have created a sample demonstrating this.
Please take a look at the sample and let me know if this helps you or you need further assistance on this matter.