API Testing · Senior · Question 59 of 75
How do you test API localization, e.g. error messages in several languages?
- 1Translate the JSON keys and check the API still works
- 2Localization is UI-only, so APIs don't need such tests
- 3Send
Accept-Languagevariants and check messages and formats
Show the answer
Correct answer: Send Accept-Language variants and check messages and formats
Explanation
Messages, number and date formats may depend on the header. Codes should stay stable across languages for clients.