none
Project Server REST queries - Localization RRS feed

  • Question

  • Hi folks,

    We are using simple REST queries to get the information from some projects. Sounds easy, and it is.

    The problem comes when you have sites in different languages (Italian, English, Spanish, ...) and you try to construct a normal REST query. Basically, as we know, with one query, doesn´t matter the language, the query would be like this:

    https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/Projects(guid'423507d1-c82c-e211-8590-080027e78499')

    In this query, we are asking for the information of the Project which has the ProjUid 423507d1-c82c-e211-8590-080027e78499.

    Everything looks good when the query is done in a English site, but when this query is realized in a non-english site, we were noticed that "Resource not found for the segment 'Projects'"... Strange!!

    And then... we tried to change the word Projects depending on the language the site is. Some examples:

     - Spanish: https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/Proyectos(guid'423507d1-c82c-e211-8590-080027e78499')

    - Italian: https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/Progetti(guid'423507d1-c82c-e211-8590-080027e78499')

    The result is succesful, but... does it mean that I have to change my REST query for every language my app will be installed? I HOPE NO...

    Does someone have been faced to something similar? Any ideas would be appreciated...

    Many thanks!

    Tuesday, January 15, 2013 5:44 PM

Answers

  • Hi Sriam,

    Sorry about my brief answer :)

    The key of the concept would be to put the language code (en-US, es-ES, de-DE, etc...) just after the ProjectData, and the consult OData by the language you want.

    Does not matter the language the SharePoint or Project Server is installed. One example in the Italian site:

    - Italian: https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/Progetti(guid'423507d1-c82c-e211-8590-080027e78499') (Before my question)

    - Italian: https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/[en-US]/Projects(guid'423507d1-c82c-e211-8590-080027e78499') (with the language you want to ask OData)

    Hope that helps!

    • Marked as answer by Miguel Soler Friday, January 18, 2013 8:38 PM
    Friday, January 18, 2013 6:08 PM

All replies

  • Its by design.

    Workaround: Install English Language pack.


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    Thursday, January 17, 2013 2:21 AM
    Moderator
  • Hi Sriram,

    Seems that there aren´t good news for me...

    Will this design change to the final Release of Project Server? I´m pretty sure that the most apps developers will not be glad to hear this "new"...

    Looking forward to know more about it!!

    Thursday, January 17, 2013 9:10 AM

  • https://site.sharepoint/sites/pwa/_api/ProjectData/[en-US]/$metadata
    https://site.sharepoint/sites/pwa/_api/ProjectData/[en-ES]/$metadata

    REGARDS!!

    • Marked as answer by Miguel Soler Friday, January 18, 2013 2:52 PM
    • Unmarked as answer by Miguel Soler Friday, January 18, 2013 8:38 PM
    Friday, January 18, 2013 2:52 PM
  • Hello Miguel,

    Could you please elaborate your answer?


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    Friday, January 18, 2013 4:51 PM
    Moderator
  • Hi Sriam,

    Sorry about my brief answer :)

    The key of the concept would be to put the language code (en-US, es-ES, de-DE, etc...) just after the ProjectData, and the consult OData by the language you want.

    Does not matter the language the SharePoint or Project Server is installed. One example in the Italian site:

    - Italian: https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/Progetti(guid'423507d1-c82c-e211-8590-080027e78499') (Before my question)

    - Italian: https://mysupermegasite.sharepoint/sites/pwa/_api/ProjectData/[en-US]/Projects(guid'423507d1-c82c-e211-8590-080027e78499') (with the language you want to ask OData)

    Hope that helps!

    • Marked as answer by Miguel Soler Friday, January 18, 2013 8:38 PM
    Friday, January 18, 2013 6:08 PM
  • Fantastic.

    Discussed with my concerned team about this information, planning to put it in an article.


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    Friday, January 18, 2013 6:52 PM
    Moderator
  • Sriram,

    If you finally write your article, thank to Manel Carrillo... he is the man!!

    Regards!

    Friday, January 18, 2013 10:19 PM