I've just began building a multilingual REST API and are unsure on if there's any convention to follow regarding how I should integrate the multilinguality properly.
Below is a list of alternatives I have come up with, not knowing which makes most sense.
Option 1:
Language-variable in URI: http://myapi.com/en/users/john
Option 2:
Returning only error codes for translation client side:
GET http://myapi.com/users/john => HTTP 404 {status: false, error_code: "321"}
Option 3:
Returning in all available languages: GET http://myapi.com/users/john => {status: false, error_en: "User not found", error_sv: "Anvandaren finns inte"}