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”.
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.
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.
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.
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.
if sending php request, you may also send user agent header, otherwise your requests could be blocked - if not already done (file_get_contents or curl, both will work, with user agent)
@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?
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.
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
@CardVibes I think you solved that problem already by “caching” (or storing) the resonses separatly, right?