rediche/gw2-ninja

[Suggestion] Localisation of Itemnames.

Closed this issue · 4 comments

Description

Currently the Itemnames are localized by the Accept-Language Header, which is pooled from the Browser.
This creates an problem for people with mismatching languages between browser and game client.
For Example, my system is on german, but my client is in english.
An Option to set the language to something else would be nice.

Steps to reproduce

Have an Accept-Language Header with es, de, fr, ko or zh.
Have the gameclient in something different.
Open up the collection page and copy paste everything into the wiki to check what it's called in your current game client language.

Browsers Affected

  • [ p ] Chrome
  • [ T ] Firefox
  • [ p ] Safari 9
  • [ p ] Safari 8
  • [ p ] Safari 7
  • [ p ] Edge
  • [ p ] IE 11
  • [ p ] IE 10
    Tested on FF 52.7.3 ESR, since it's an header issue, it'll properly be also on every other browser.

Yea I just got another report of that on Reddit. Was actually unaware of that. I think the progress will be that I patch it to pull only english for now and then make a language selector to choose the language of content from the API.

@Tomelyr I deployed a new version that uses lang=en on all the GW2 API requests. Can I get you to confirm that the changes are working? You might have to clear your cache before the change goes through.

I checked where I set my own Accept-Lang to german in Postman where using a lang param in the URL resulted in that being used over the Accept-Lang. But I would like a proper verification from someone with the proper browser settings :)

Can verify. Issue is fixed (temporary).

#9 will fix it for good i think :)

@Tomelyr Just deployed the changes, so you can change the language of the API data. However, the sames of the collections will still be in English since those are hardcoded, but the individual items are translated.