0

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.

4
  • On SharePoint hosted app you have a query string parameter called SPLanguage, maybee this is available also in provider hosted apps? Commented Apr 24, 2013 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. Commented Apr 24, 2013 at 14:09
  • Might be, or it is the server language. Just spotted it and wanted to give you a heads up :) Commented Apr 24, 2013 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 :-/ Commented Apr 24, 2013 at 16:32

2 Answers 2

1

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.

0

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

_spPageContextInfo.currentLanguage

this returns the actual string "en-US":

_spPageContextInfo.currentUICultureName
1
  • I need this info from within the app which is a custom ASP.NET site, not one from SharePoint. Commented Jul 16, 2013 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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