I can't speak to "best practice", but I think it is going to depend on what you need to localize.
In our project, once we gave a lot of thought to what needed to be localized, we realized that it was only error messages and status messages, so we decided on the following approach:
- all messages are prepared from a Message Property File (more specifically, a Java Resource Bundle)
- in the API, we have a specific Representation for "message" responses that includes the localized message, and also includes the property file key along with the list of parameters (if any) used in preparation of the message
- we will attempt to generate the message string localized according to the Accept-Language header. If there was no Accept-Language header, we will localize according to the system default language
- at the same time, we will publish the Message Property File. This allows clients to do their own localization based on our property key and parameters if they don't like ours (or we don't support their required language).
We considered a lookup service (and haven't ruled it out), but we have so much core API to implement that it could be a while before we get to it.
As for PUT/POST, in the end we didn't see a localization requirement. If the data is straight up user data (for example, a tag or a name, or something like that), we maintain/persist the data exactly as it was provided by the client. If the data is more relational/flag/enum in nature, well, that's just an integer disguised as a string - meaning, we're treating it as a programmatic value that clients probably shouldn't directly expose to the end user, so it doesn't need to be localized in the API (it should only be localized in the presentation layer).
We are intending to provide a lookup service for enum values, but we haven't decided yet whether we provide localization for that. If we do, we would probably use an algorithm similar to the message algorithm, and once again publish the Property File.
I am interested to see what other people are doing.
Cheers,
Julie