However, I am unable to access this property when working with an IPublishedContent object in an API controller. This is vital as I need to be able to select and work with the correct pages based upon their culture for my application to ensure that data is injected into the correct language nodes via the content service.
Does anyone know how I can get this to work or get the culture?
Cannot use getCulture() on an IPublishedContent object in API controller
Hi all,
I have a bit of a dilemma. I am using Umbraco 7.2.4 after being told that this version is required to be able to access the culture of a page.
https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/64353-Accessing-the-language-culture-of-a-page-from-the-Umbraco-content-service
However, I am unable to access this property when working with an IPublishedContent object in an API controller. This is vital as I need to be able to select and work with the correct pages based upon their culture for my application to ensure that data is injected into the correct language nodes via the content service.
Does anyone know how I can get this to work or get the culture?
So far I am doing the following:
However, the GetCulture() method is marked as invalid in Visual Studio.
First of all, the GetCulture()-methot is in the extension Umbraco.Web.PublishedContentExtensions. Did you include the Umbraco.Web-namespace?
Secondly, do you use diffrent hosts to for each culture?
is working on a reply...