Retrieve Content For Specific Language

How do you filter content in Umbraco based on language-specific property values?

For example, let’s say the default language is en-US and we have a property called “slug”. We have a US version of an article with the slug of “color” and we have localised this article for en-AU where the slug property is overridden to the Australian spelling of “colour”.

I have tried using the following:

UmbracoHelper.ContentSingleAtXPath(“//article[slug=‘colour’]”)

However, this only seems to be searching property values in the primary language, so doesn’t find the article. I only want the search to look at localised en-AU values.

Additionally, how do you only retrieve articles where they have been localised for Australia?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/111875-retrieve-content-for-specific-language