Edit

Share via


FaultReason.GetMatchingTranslation Method

Definition

Gets the fault description in a specific language.

Overloads

GetMatchingTranslation()

Gets the fault description in the language used by the current thread.

GetMatchingTranslation(CultureInfo)

Gets the fault description in the specified language.

GetMatchingTranslation()

Source:
FaultReason.cs
Source:
FaultReason.cs

Gets the fault description in the language used by the current thread.

public:
 System::ServiceModel::FaultReasonText ^ GetMatchingTranslation();
public System.ServiceModel.FaultReasonText GetMatchingTranslation ();
member this.GetMatchingTranslation : unit -> System.ServiceModel.FaultReasonText
Public Function GetMatchingTranslation () As FaultReasonText

Returns

A FaultReasonText object that contains the fault description.

Remarks

A translation is always returned.

  • If only one translation exists, it is returned.

  • If there is an exact match for a CultureInfo.CurrentCulture, that is returned.

  • If there is a translation for a parent language of CultureInfo.CurrentCulture, that is returned.

  • Otherwise, the first translation in the set is returned.

Applies to

GetMatchingTranslation(CultureInfo)

Source:
FaultReason.cs
Source:
FaultReason.cs

Gets the fault description in the specified language.

public:
 System::ServiceModel::FaultReasonText ^ GetMatchingTranslation(System::Globalization::CultureInfo ^ cultureInfo);
public System.ServiceModel.FaultReasonText GetMatchingTranslation (System.Globalization.CultureInfo cultureInfo);
member this.GetMatchingTranslation : System.Globalization.CultureInfo -> System.ServiceModel.FaultReasonText
Public Function GetMatchingTranslation (cultureInfo As CultureInfo) As FaultReasonText

Parameters

cultureInfo
CultureInfo

A CultureInfo object that specifies the language of the fault description.

Returns

The fault text in the specified language.

Exceptions

Remarks

A translation is always returned.

Applies to