Skip to main content
Published: October 19 2006, 4:59:00 PMUpdated: November 28 2020, 2:55:20 PM

How do I specify the language in which errors and warnings are returned?


Summary

The language in which errors and warnings are returned can be specified when using the XML API, the SOAP API, the Java SDK, and the .NET SDK.



Detailed Description

  • XML API:

    Set the value of the ErrorLanguage input element to the appropriate Language Identification Tag.
    For a list of string values to use, please refer to the Language Identification Tags in Table 5-2 in the documentation.
    Here is an example:

        <?xml version="1.0" encoding="utf-8"?>
        <AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
             <Version>481</Version>
             <ErrorLanguage>en_US</ErrorLanguage>
             <WarningLevel>High</WarningLevel>
             <Item>
                  ...
                  <PrimaryCategory7>
                       <CategoryID>1463</CategoryID>
                  </PrimaryCategory>
                  <Quantity>1</Quantity>
                  ...
             </Item>
             <RequesterCredentials>
                  <eBayAuthToken>xxx</eBayAuthToken>
             </RequesterCredentials>
        </AddItemRequest>
  • SOAP API:

    Set the ErrorLangauge property (string) on the RequestType object.
    For example:

        AddItemRequestType AddItem = new AddItemRequestType();
        AddItem.ErrorLanguage = "en_US";

    For a list of string values to use, please refer to the Language Identification Tags in Table 5-2 in the documentation.
  • Java SDK:

    Set the ErrorLanguage on the ApiContext object (string) or on the AbstractRequestType object (string).
    For example:

        ApiContext Context = new ApiContext();
        Context.setErrorLanguage("en_US");

        or

        AddItemCall AddItem = new AddItemCall();
        ...
        AddItemRequestType AddItemRequest = new AddItemRequestType();
        AddItemRequest.setErrorLanguage("en_US");
        ...
        AddItemResponseType AddItemResponse = new AddItemResponseType();
        AddItemResponse = AddItem.Execute(AddItemRequest);

    For a list of string values to use, please refer to the Language Identification Tags in Table 5-2 in the documentation.
  • .NET SDK:

    Set the ErrorLanguage on the ApiContext object (codetype) or on the ApiCall.ApiRequest object (string).
    For example:

        ApiContext Context = new ApiContext();
        Context.ErrorLanguage = ErrorLanguageCodeType.en_US;

        or

        AddItemRequestType AddItem = new AddItemRequestType();
        AddItem.ApiRequest.ErrorLangauge = "en_US";

    For a list of string values to use, please refer to the Language Identification Tags in Table 5-2 in the documentation.



Additional Resources

How well did this answer your question?
Answers others found helpful