FaultReason.GetMatchingTranslation Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The CultureInfo is null
.
Remarks
A translation is always returned.
If only one translation exists, it is returned.
If there is an exact match for a System.Globalization.CultureInfo, that is returned.
If there is a translation for a parent language of System.Globalization.CultureInfo, that is returned.
Otherwise, the first translation in the set is returned.