Diablo® III

D3 API and localization

Is there any possiblity to obtain the e.g. skill descriptions in a different locale other than english?
Like when i look at a hero on eu and switch from en to es, the skills are updated accordingly.

If not, are there any plans to add this in the future?
Reply Quote
Web & Mobile Team
All of the API resources support the "locale" query string parameter.

For example:

http://us.battle.net/api/d3/profile/DerPeri-2289/?locale=es_MX
Reply Quote
It's already there? OMG, I just spend 2hrs writing a script to grab the skill names from the website to generate resx for each language.
Reply Quote
This is awesome but what are all the available locale options?

Did some searching and found:

http://www.roseindia.net/tutorials/i18n/locales-list.shtml
&
http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/a002613623.htm

but one problem in one list i see "sq_AL" for Albania on the other i see 2 options: "sq_AL" & "sq"

Does Blizzard accept all? Is there any limitations?
Edited by XjSv#1677 on 9/7/2012 11:08 AM PDT
Reply Quote
Battle.net Developer
The following locales should be supported, though some may only be enabled for specific regions. You can also just include the language code for all of the languages we support.

  • en
  • es
  • pt
  • it
  • de
  • fr
  • pl
  • ru
  • tr
  • ko
  • zh
Reply Quote
The following locales should be supported, though some may only be enabled for specific regions. You can also just include the language code for all of the languages we support.

  • en
  • es
  • pt
  • it
  • de
  • fr
  • pl
  • ru
  • tr
  • ko
  • zh


In that format? 2 characters?

In the previous post it was posted as "es_MX". So that would be just "es" then?
Reply Quote
You can use a language code (ex: es) or a locale tag (ex: es_MX). Both work.
Reply Quote
09/07/2012 03:04 PMPosted by Kalence
You can use a language code (ex: es) or a locale tag (ex: es_MX). Both work.


No i can see that but i want to know what is the proper way? They may both work but whats the difference.
Reply Quote
It's just a matter of preference, for instance, your programming platform may have pre-defined constants for language codes, but not locale tags. One isn't better than the other.

In technical terms, the only difference is that a locale tag represents a dialect of a given language in a specific region. The API either tries to find the best possible match for an unsupported tag or flat out ignores the locale's region, hence both work.
Reply Quote
2Korigus:
Are you planing on doing some localization through API? I mean, that users can provide help with localization for other languages.

Also what did you mean by that?

09/07/2012 11:43 AMPosted by Korigus
You can also just include the language code for all of the languages we support.


Is there some special code for fetching response for all languages you support?

Thanks.
Edited by NetJunky#2214 on 9/8/2012 4:29 AM PDT
Reply Quote
09/08/2012 04:22 AMPosted by NetJunky
You can also just include the language code for all of the languages we support.


Is there some special code for fetching response for all languages you support?

Thanks.

No. He is saying you can include the localization code on the request and listed all the languages they support.

ie:
http://us.battle.net/api/d3/profile/DerPeri-2289/?locale=en
http://us.battle.net/api/d3/profile/DerPeri-2289/?locale=es
http://us.battle.net/api/d3/profile/DerPeri-2289/?locale=ru
etc...
Edited by Poutine#1541 on 9/8/2012 4:33 AM PDT
Reply Quote
Now I see. Thank you. Added it to my Api.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]