Monday, October 14, 2013

Project Server 2013 Online. OData localization

When you deal with on-premise installation of Project Server 2010/2013, you can use Reporting database to access data for reporting purposes. But when we are talking about Project Server Online, the data access gets more complex. The thing is that you don’t have direct access to the databases, and the only way to get your data is to use OData protocol.

There are lots of nice posts all over the Internet (like this or this) which describe how to use OData with Project Online. One of the features of OData is localization - you request and get the data based on language you like.

This is done by adding language prefix to the URL, something like this:

https://site.sharepoint/sites/pwa/_api/ProjectData/[en-US]/

If you don’t specify the language explicitly, the OData feed will have the same language as your site default one (you’ve specified it during PWA provisioning). But other supported languages are available as well.

One thing we’ve noticed: once you’ve provisioned a new instance of PWA site, you get only one, default locale working. For all other locales you’ll get error messages similar to following:

<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
   <m:code/>
   <m:message xml:lang="ru-RU">
      The requested langauage en-US is not supported or currently installed.
   </m:message>
</m:error>

Even if you navigate to the BI site, you’ll see reports only for site default language. The good thing is that both reports and OData languages will become available after a while. In our case it was about half of a day. For some reason, the languages are “installed” to the PWA instance with some delay. So if you need this feature working on your PWA site, be patient and you’ll get it… soon…

3 comments: