mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #285] Unable to add parameters & headers to force results in English #213
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#213
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @darius00klokj on GitHub (Oct 2, 2025).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/285
Depending on the market one fetches from, you can get different artist names. So we need a way to specify the language in the getArtist function. Example: Artist "Noriko Kose" with ID: 13gezgXsLR3QZbKvi7Fc2K will return its Japanese name by default.
I would like to be able to specify that the name should be in English Alphabet. Suggested changes:
from
to
This way I can add
Output after test:
@jwilsson commented on GitHub (Oct 6, 2025):
Hello!
I didn't know about passing
Accept-Languageto get results in other alphabets but I do think something like adefault_headersoption would be a better fit. Something likeThat way you wouldn't have to extend every method with it. And it seems passing
Accept-Languageis enough, when I tested just passing that I get the expected English alphabet back. It doesn't look like themarketoption is supported when fetching artists.@jwilsson commented on GitHub (Oct 12, 2025):
Added a
default_headersoption in6.3.0. Please let me know if it doesn't work!@darius00klokj commented on GitHub (Oct 23, 2025):
Thanks @jwilsson it works!
Sorry for the late reply.