Issue in getting french content from catalog metafield

Vote:
 

Hi Team,

I am facing issues in fetching the catalog metafield value with culturespecific.

I have a metafiled displayname in two languages "en-ca" and "fr-ca". But when I try to access the metafiled, it is always fetching me the "en-ca" text.

[CatalogContentType(DisplayName="Currency", MetaClassName="Currency", GUID="8BEBFA5C-BCC7-4351-B050-440E30C72F15")]
public class Currency : VariationContent
{

[Display(
Name = "Country Code",
Description = "",
GroupName = "Information",
Order = 1100)
[CultureSpecific]
public override string DisplayName
{
get;
set;
}

}

Let me know how to get french content.

Thanks in advance.

Thanks,

Manjeera T

#154896
Sep 01, 2016 10:20
Vote:
 

Hi,

When you use IContentLoader (or IContentRepository), you can use the overload which takes CultureInfo, like this:

T Get<T>(Guid contentGuid, CultureInfo language) where T : IContentData;

#154901
Sep 01, 2016 11:07
Vote:
 

Hi Quan,

Issue is resolved.

Thanks.

Regards,

Manjeera T

#154908
Sep 01, 2016 13:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.