davidchambers / tutor

JavaScript interface for the Gatherer card database
https://gatherer.wizards.com/
Do What The F*ck You Want To Public License
149 stars 18 forks source link

Language Support #89

Open phrozen opened 9 years ago

phrozen commented 9 years ago

Is there a remote possibility to have language support at least on card search by name? (Maybe explicitly specifying the language). AFAIK Gatherer lets you change the language on the whole site only, if this is done via a cookie, maybe it can be replicated.

davidchambers commented 9 years ago

Is there a remote possibility to have language support at least on card search by name?

Are there URLs which include card names in languages other than English? For example, is there a non-English equivalent of http://gatherer.wizards.com/Pages/Card/Details.aspx?name=Lightning%20Bolt?

phrozen commented 9 years ago

Apparently just by Multiverse ID (which is indeed different).

http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=224905 (Spanish) http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=205227 (English)

Both from M11, is there a way to access the different languages of the printings of the card after a search by name? Maybe to provide the options.

Although while trying to search by name... apparently Gatherer puts the search query in brackets. http://gatherer.wizards.com/Pages/Search/Default.aspx?name=+[Testigo]

Of course that will only find something if you switch your language (at the bottom) to Spanish. It would be helpful to know if they do this with a cookie (which can be replicated)

davidchambers commented 9 years ago

There's a cookie named CardDatabaseSettings. Here's its value with my default settings (English):

0=0&1=28&2=0&14=1&3=13&4=0&5=1&6=15&7=0&8=1&9=1&10=19&11=4&12=8&15=1&16=0&13=
      ^^

After switching my preferred language to Spanish:

0=0&1=es-ES&2=0&14=1&3=13&4=0&5=1&6=15&7=0&8=1&9=1&10=19&11=4&12=8&15=1&16=0&13=
      ^^^^^

Are you interested in working on a pull request, @phrozen?