Spreadshop API language files

Good day,

Through the API I can reference all kinds of information used in my Spreadshop. I’d love to find a way though to reference the UI language files of my shops.

I mean the files that say in english it’s “Add to cart” and in german it’s “In den Warenkorb”.

Is this possible and if so, how?

Thnx!

It might be a workaround until this might be possible, but you could also use css to exchange strings in frontend using the ‚content‘ property. This must be possible too, if you’re just targeting single strings or small textes.

Hi @lovetee,

Thnx for the reply, but this not solve my problem. I want to access the Spreadshop language files through the API so I can use them server side for an application I’m building. I don’t know though if this information is available through the API.

Thanks for clarification and saying you won’t just modify single words and want to have the whole translation strings! :pray:

After inspecting code of an integrated shop, I found this:

https://shop.spreadshirt.net/welovetee/shopData/core?locale=de_EU&integrated=true

You have to replace https://shop.spreadshirt.net/welovetee with your shop url and change locale=de_DE to your desired language locale. Then you’ll receive a JSON file with all translations in required language you might need.

Hope that helps :slight_smile:

Good luck!
Thimo

1 Like

Hi thnx for the effort,
I allready had that one. It works in a browser and it used to work from my php scripts but that stopped. If you find a way to call it server side from a php script I’m saved.

Hi that’s strange. Only just now the JSON method you suggested started working again… That’s nice for now.

if sending php request, you may also send user agent header, otherwise your requests could be blocked - if not already done :wink: (file_get_contents or curl, both will work, with user agent)

more details: https://www.spreadshirt.co.uk/blog/2017/12/21/changes-api-usage/

Hi Lovetee,

I did send a user agent, but yesterday I changed it to match the API criteria. I guess that made it work again.

Thnx for the time invested, much appreciated.

1 Like

Please let us know your app when ready :slight_smile:

1 Like

Hi Lovetee,

The app is in Beta and live on my website: https://www.cardvibes.com/de/

It is used to easily integrate and manage Spreadshops in Joomla! and hopefully make the shops a bit more searchengine friendly.

1 Like

Oh, I forgot. There’s also a Joomla Spreadshop module as can be seen over here: https://www.cardvibes.com/de/blog

very cool!! :heart_eyes:

1 Like

To bad. It stopt working again. Accessing the XML’s through the API works fine. But apparently were not allowed to acces the Spreadshop JSON files… :disappointed:

Hi,

sure that you send at least user agent and authentication header and they’re working correctly?

Maybe @Thomas_Spreadshop can assist?

Best
Thimo

Btw did you „cache“ the language files? It might be a problem requesting them too often with the same ip.

sorry. when it comes to API stuff, I am not a trustable person :smiley:

1 Like

@Thomas_Spreadshop sorry, do you know someone who might be able to help @CardVibes?
I assume @CardVibes caches results and uses authentication headers to authenticate himself and the application to not being blocked. So it might be a bug?

question is forwarded to our developers to have a look into that matter

Allright: Common sense is that anything Shop UI (hop.spreadshirt./shopData/) related is not intended to be edited. So no there won´t be a workaround which support here.
Everything that is supported officially can be found within our API.

Anyway you are free to make an official feature request for our shop team over here:
https://feedback.spreadshirt.net/forums/290698-partner-feedback-en?category_id=101257

It’s not regarding editing, it’s just reading. Common sense is, that files available in internet are at least readable.
This is NOT answering the question :slight_smile:

@CardVibes I think you solved that problem already by “caching” (or storing) the resonses separatly, right?

1 Like