Localization of the print out

When I create a project with tasks and use


project.Print()

all the labels are in English. I understand, that date label format can be changed by enum.
But how can I change “Task Name” or “Duration” to my languages (German, Spanish, Frensh).

Setting the Thread.CurrentCulture or CurrentUICulture did not work.

Thank you

Hi Ingo,

Thank you for contacting Aspose support team.

You can change the column titles before Print() using Project.Tables as shown below. Please give it a try and let us know the feedback. Output PDF file is given here as the result of Print() function.

P.S. The Japanese characters are just random strings for demonstration and may not be considered as actual translated name of the field.

Project proj = new Project(@“D:\Aspose_DotNetProjects\Blank2010.mpp”);
proj.Set(Prj.NewTasksAreManual, false);
proj.Set(Prj.StartDate, new DateTime(2016, 5, 23, 8, 0, 0));
Task task1 = proj.RootTask.Children.Add("Task 1");
task1.Set(Tsk.Start, new DateTime(2016, 5, 23, 8, 0, 0));
task1.Set(Tsk.Duration, proj.GetDuration(16, TimeUnitType.Hour));
task1.Set(Tsk.PercentComplete, 100);
Task task2 = proj.RootTask.Children.Add("Task 2");
task2.Set(Tsk.Start, new DateTime(2016, 5, 23, 8, 0, 0));
task2.Set(Tsk.Duration, proj.GetDuration(16, TimeUnitType.Hour));
task2.Set(Tsk.PercentComplete, 100);
foreach (TableField field in proj.Tables.ToList()[0].TableFields.ToList())
{
    if (field.Field == Field.TaskName)
        field.Title = "日本人の氏名";
    else if (field.Field == Field.TaskDuration)
        field.Title = "かかります";
}
proj.Print();

Hi,

i had tested your solution.
But this translate only the title of the first 8 columns.
We need to translate all labels on the printout document.
How can i translate the titles of gantt with weekday, and the duration type label (days, hrs etc.), and the legend on bottom?

Please see the attached screen shot.

Hi,

We are currently working over your requirements and will soon share our feedback with you here. We appreciate your patience until then.

Hi Ingo,


We have analyzed the requirement in detail and tried to achieve this option using Microsoft Project but could not find any option. I am afraid that Aspose.Tasks also does not support this feature and only column headers can be changed as mentioned in the above sample code.

Should you have any other query in this regard, please feel free to write us back.