From 6fbf10fd03c5bc0184cf0ba7489b773e86cf8861 Mon Sep 17 00:00:00 2001 From: apidesigner Date: Fri, 16 Jun 2017 13:43:10 +0000 Subject: [PATCH] Updates execution/localization.md Auto commit by GitBook Editor --- execution/localization.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/execution/localization.md b/execution/localization.md index df460c1..66e75cc 100644 --- a/execution/localization.md +++ b/execution/localization.md @@ -1,7 +1,7 @@ # Localization ## Language Variants -If a resource has multiple language variants and the difference between variantsis only in the language of human readable fields then the [`Accept-Language`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) request HTTP header **SHOULD** be used to communicate the desired language variant. +If a resource has multiple language variants and the difference between variants is only in the language of human readable fields then the [`Accept-Language`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) request HTTP header **SHOULD** be used to select the desired language variant. #### Example @@ -19,4 +19,20 @@ Vary: Accept-Language ... ``` -## Language or Country-specific Data Structure \ No newline at end of file +## Language or Country-specific Data Structure +If the difference between language or country specific variants of a resource is bigger than just in the content of a human readable strings, for example the data structure of the resource representation is different, then a query parameter **SHOULD** be used to communicate the requested variant. + +#### Example + +``` +GET /article?market=en_US HTTP/1.1 +``` +``` +HTTP/1.1 200 OK +Content-Type: application/hal+json;charset=UTF-8 +Content-Language: en +Vary: Accept-Language + +... +``` +