Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to get the current display language of a web via Client Object Model (C#) from a provider-hosted App. The app runs inside a Client Web Part (IFrame). I am aware of this solution but think it is not applicable to my situation, as the App does not contain the necessary JavaScript libraries.

I already have a client context. How could I get the display language?

Edit: The discussion over here also reflects my problem pretty well.

share|improve this question
    
On SharePoint hosted app you have a query string parameter called SPLanguage, maybee this is available also in provider hosted apps? –  Robert Lindgren Apr 24 '13 at 12:09
    
@RobertLindgren Yes it is available. But it doesn't correctly reflect the current display language. So either its meaning is something else (default language maybe?) or it's a bug. –  Heinrich Ulbricht Apr 24 '13 at 14:09
    
Might be, or it is the server language. Just spotted it and wanted to give you a heads up :) –  Robert Lindgren Apr 24 '13 at 14:36
    
It seems to reflect the regional settings of the site collection, see the discussion here: social.msdn.microsoft.com/Forums/en-US/appsforsharepoint/thread/… - so no luck :-/ –  Heinrich Ulbricht Apr 24 '13 at 16:32
add comment

2 Answers 2

The parameters refered to in the link is rendered by SharePoint it self by default, hence your app should not need to reference any specific js libraries to be able to use them.

But I do understand if you do not want to be reliant on outside javascript libraries.

share|improve this answer
add comment

this is global js object in sharepoint page that return language id. 1033 for en-US

_spPageContextInfo.CurrentLanguage
share|improve this answer
    
I need this info from within the app which is a custom ASP.NET site, not one from SharePoint. –  Heinrich Ulbricht Jul 16 '13 at 8:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.