Hi,
I'm having a bad time trying to search how I can change the columns resource strings and didn't find any site that help me. I need to translate the following columns to Portuguese Brazil. Can someone help me?
Thanks
Hello Roger,
Thank you for your post. I have been looking into it and I can suggest you create a Style for the HeaderCellControl and add an EventHandler for its Loaded event like this:
<Style xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives" TargetType="{x:Type igPrim:HeaderCellControl}"> <EventSetter Event="Loaded" Handler="HeaderCellControl_Loaded"/> </Style>
And in the handler you can get the Text of each Header and change it like this:
private void HeaderCellControl_Loaded(object sender, RoutedEventArgs e) { (Utilities.GetDescendantFromType(sender as DependencyObject, typeof(TextBlock), true) as TextBlock).Text = "new Text"; }
Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Thank you Stefan,
Please can you confirm if this componente (xamlGantt) will have a complete resource like a Schedule Resource Strings?
if i need a complete translation can i use a style until that?
Hello Eduardo,
You can customize the Resource Strings as described here:
http://help.infragistics.com/Help/Doc/WPF/2013.1/CLR4.0/html/Developers_Guide_Customizing_Resource_Strings.html
The default Resource file is located here by default:
C:\Program Files (x86)\Infragistics\2014.1\WPF\CLR4.0\Bin
and it is called InfragisticsWPF4.Controls.Schedules.XamGantt.v14.1.resx. There you can see the strings you need and follow the approach described in the first link. I also attached a sample project showing this. Please let me know if this helps you or you need further assistance on this matter.
Hi Stefan,
I did what you said in this topic and it works fine.
I can change the message errors but can't change the "fields name", what means that I have a message like this:
"O campo '{0}' é somente leitura"(Portuguese-BR) where my {0} entry is a field name in english (like 'ManualDuration'), I need to change this too to complete my work. How can I change this??
Thanks for helping.
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account \Keys & Downloads.
https://es.infragistics.com/my-account/keys-and-downloads/
I have contacted with our developers and after further investigations they determined that the localized value should be used instead of the Column key, so I have logged this under ID: 173693 and I have also created a support ticket on your behalf: CAS-138493-G5J5M0 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
I have checked this in the XamGantt source code and it seems like that the value that is passed to the first argument of the string format is static and currently it cannot be localized, so you can log this a new product idea here:
http://ideas.infragistics.com/
Please let me know if you need any further assistance on this.
I do translated the column header, but the message that I got isn't the column header, its the column KEY.. My header column is named 'Duração', the message shows me 'ManualDuration'.
Let me maybe be more clear.
My resources strings are like this:
TaskColumnDisplayName_ManualDuration : Duração
InvalidTextValueForAutoScheduledTask : O campo '{0}' não pode ser setado para o valor de texto ('{1}') para tarefas agendadas automaticamente.
Where the {0} is the column key for some reason.
Thanks for your attention.
Since the resource string your changed used the Column's HeaderText, you should change the header, too. The name of the Duration resource string is "TaskColumnDisplayName_ManualDuration". You are not able to have it in English in the header and on Portuguese in the ,message.