localisation in RESTful services
问题 I have a RESTful service that returns an enum. I was pondering whether to return integers or strings for an enum value, when it occurred to me that returning a string would depend on the locale of the client. So how should you handle localisation in REST? Is locale part of conneg? 回答1: Localisation is part of content negotiation, and language preferences are specified using the Accept-Language header (RFC). The RFC is quite strict about what the service is allowed to return here — for