Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API translates my listings into German #59

Closed
SunburntRock89 opened this issue Apr 13, 2021 · 4 comments
Closed

API translates my listings into German #59

SunburntRock89 opened this issue Apr 13, 2021 · 4 comments

Comments

@SunburntRock89
Copy link

SunburntRock89 commented Apr 13, 2021

new eBayApi({
	appId: config.eBay.clientID,
	certId: config.eBay.clientSecret,
	sandbox: false,
	siteId: eBayApi.SiteId.EBAY_GB,
	scope: [
		"https://api.ebay.com/oauth/api_scope",
	],
	acceptLanguage: "en-GB",
	contentLanguage: ContentLanguage.en_GB,
});

this.ebay.oAuth2.getClientAccessToken()`

This is how I initialize the API wrapper. Later I call

let item = await this.ebay.buy.browse.getItemByLegacyId({
	legacy_item_id: itemID,
});

This query works, but the title of the listing is translated into German from English.
For example. the title Samsung SMT-C7100/C7101 500GB Boxed with Remote Control NEW becomes Samsung smt-c7100/c7101 500gb boxed mit Fernbedienung NEU but the description remains in English. Also, some details such as condition are also translated into German, such as condition, neu. The price is also converted into Euros.

Help with this would be appreciated.

@dantio
Copy link
Collaborator

dantio commented Apr 13, 2021

Didn't check, but try to set also the marketplaceId:

new eBayApi({
	appId: config.eBay.clientID,
	certId: config.eBay.clientSecret,
	sandbox: false,
	siteId: eBayApi.SiteId.EBAY_GB,
        marketplaceId: eBayApi.MarketplaceId.EBAY_GB,
	scope: [
		"https://api.ebay.com/oauth/api_scope",
	],
	acceptLanguage: "en-GB",
	contentLanguage: ContentLanguage.en_GB,
});

@SunburntRock89
Copy link
Author

Yep, that worked. Still can't understand why it chose German. Thanks a bunch!

@dantio
Copy link
Collaborator

dantio commented Apr 13, 2021

Because this API is heavily used and developed by German merchant :)
I'll explaint this more in documentation and maybe it would be better to to set US/GB as default...

@SunburntRock89
Copy link
Author

Ah I see. It could be more preferable to not have a default and force the user to specify their own?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants