Project Server 2010: Localization and the SDK Samples


We had a support case this week relating to the use of the samples from the SDK on a Spanish version of Project Server 2010.  It was possible to work around the initial issues by installing the English version, and applying the Spanish language pack – but this isn’t an ideal combination if Spanish is the desired main language as certain things will always display in the the core language – and in this case English.  The biggest issue for the customer was that even with the Spanish language pack the labels for the project impact statements would still read None, Low, Moderate etc. instead of the desired Ninguno, Bajo, Moderado etc.

So the best solution is to address the original problem – the sample not working on the Spanish version.  In this case it was the code for the sampleproposal2, supplied with the SDK as an example of how the out of the box sample proposal was coded.  Now the samples are not localized and this was the problem – some hard coded strings in the samples do not play well with a non English installation.  The first issue when trying to deploy the sample was “Error      1              Error occurred in deployment step ‘Activate Features’: Failed to create workflow association ‘SampleProposal2 – ProjectWorkflow’. Cannot find SharePoint list with name "Project Server Workflow Tasks" . 

Looking at the properties of the workflow it can be seen that the history list and the task list that the sample want to use are in English:

image

So to correct this you can ensure you have the right localized lists – which can be found by looking at your site content (Site Actions, View All Site Content – or whatever this is in your language of choice).

image

and again, in Spanish:

image

Once these are corrected the workflow will deploy, but there is another issue.  Firstly like the English version you will need a user in the Portfolio Mangers group(“Jefes de cartera de proyectos” )  to be assigned the workflow tasks.  Once this is done then tasks will be assigned but it was found that once these tasks were approved they were not going all the way to Completed (which they do in an English version) but were sticking at Approved (or Rejected) – or rather Aprobado (o Rechazado).  Again, this comes down to a hard coded string – this time in the WorkflowStrings.cs file.  The first two string variables set are:

public static string APPROVAL_TASK_OUTCOME_APPROVED = "Approved";
public static string APPROVAL_TASK_OUTCOME_REJECTED = "Rejected";

and these are used to identify when a workflow has reached the specific status – and then they are automatically moved on to Completed.  As the string in a Spanish system will be Aprobado and not Approved they just get stuck.  Just updating these strings to:

public static string APPROVAL_TASK_OUTCOME_APPROVED = "Aprobado";
public static string APPROVAL_TASK_OUTCOME_REJECTED = "Rechazado";

will resolve things.  Obviously the code needs to be re-built, deployed and then the services stopped/started and an IISRESET – and the new workflow re-associated with an EPT before you see the change…

As you will no doubt see there are many more strings in the WorkflowStrings.cs file that will make the sample more usable in a Spanish system if they were to be translated.  Most are just used in dialogs – so do not break anything if they are in English – apart perhaps from their understanding.

Thanks to my colleague Sutendu for his help with this support incident.

Comments (0)

Skip to main content