Translation API — client.commerce.translation¶
Version v1_beta.1.6 · base path /commerce/translation/v1_beta · async twin: the same methods on
AsyncEbayClient, awaited.
Operations¶
Bases: BaseResource
translate ¶
translate(*, body: TranslateRequest, x_ebay_c_marketplace_id: str | None = None, raw_response: Literal[False] = False) -> commerce_translation_models.TranslateResponse
translate(*, body: TranslateRequest, x_ebay_c_marketplace_id: str | None = None, raw_response: Literal[True]) -> httpx.Response
translate(*, body: TranslateRequest, x_ebay_c_marketplace_id: str | None = None, raw_response: bool = False) -> commerce_translation_models.TranslateResponse | httpx.Response
This method translates listing title and listing description text from one language into another. For a full list of supported language translations, see the table .
Models¶
ErrorParameter ¶
LanguageEnum ¶
Bases: OpenStrEnum
Translation ¶
Bases: EbayModel
original_text
class-attribute
instance-attribute
¶
original_text = Field(None, alias='originalText', description='The original text, in the language specified in the from field, that was input into the text field in the request.')
translated_text
class-attribute
instance-attribute
¶
translated_text = Field(None, alias='translatedText', description='The translation of the original text into the language specified in the to field.')
TranslationContextEnum ¶
Error ¶
Bases: EbayModel
category
class-attribute
instance-attribute
¶
category = Field(None, description='Identifies the type of error.')
domain
class-attribute
instance-attribute
¶
domain = Field(None, description='Name for the primary system where the error occurred. This is relevant for application errors.')
error_id
class-attribute
instance-attribute
¶
error_id = Field(None, alias='errorId', description='A unique number to identify the error.')
input_ref_ids
class-attribute
instance-attribute
¶
input_ref_ids = Field(None, alias='inputRefIds', description='An array of request elements most closely associated to the error.')
long_message
class-attribute
instance-attribute
¶
long_message = Field(None, alias='longMessage', description='A more detailed explanation of the error.')
message
class-attribute
instance-attribute
¶
message = Field(None, description="Information on how to correct the problem, in the end user's terms and language where applicable.")
output_ref_ids
class-attribute
instance-attribute
¶
output_ref_ids = Field(None, alias='outputRefIds', description='An array of request elements most closely associated to the error.')
parameters
class-attribute
instance-attribute
¶
parameters = Field(None, description='An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.')
subdomain
class-attribute
instance-attribute
¶
subdomain = Field(None, description='Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.')
TranslateRequest ¶
Bases: EbayModel
from_
class-attribute
instance-attribute
¶
from_ = Field(None, alias='from', description='The language of the input text to be translated. Not all LanguageEnum values are supported in this field. For a full list of supported language pairings, see the Supported languages table .')
text
class-attribute
instance-attribute
¶
text = Field(None, description='The input text to translate. The maximum number of characters permitted is determined by the translationContext value: ITEM_TITLE : 1000 characters maximum ITEM_DESCRIPTION : 20,000 characters maximum. Note: When translating ITEM_DESCRIPTION text, HTML/CSS markup and links can be included and will not count toward this 20,000 character limit.')
to
class-attribute
instance-attribute
¶
to = Field(None, description='The target language for the translation of the input text. Not all LanguageEnum values are supported in this field. For a full list of supported language pairings, see the Supported languages table .')
translation_context
class-attribute
instance-attribute
¶
translation_context = Field(None, alias='translationContext', description='Input the listing entity to be translated. Valid Values: ITEM_TITLE and ITEM_DESCRIPTION .')
TranslateResponse ¶
Bases: EbayModel
from_
class-attribute
instance-attribute
¶
from_ = Field(None, alias='from', description='The enumeration value indicates the language of the input text.')
to
class-attribute
instance-attribute
¶
to = Field(None, description='The enumeration value indicates the language of the translated text.')
translations
class-attribute
instance-attribute
¶
translations = Field(None, description='An array showing the input and translated text. Only one input string can be translated at this time. Support for multiple continuous text strings is expected in the future.')