Book Image

RESTful Java Web Services, Second Edition

Book Image

RESTful Java Web Services, Second Edition

Overview of this book

Table of Contents (17 chapters)
RESTful Java Web Services Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Multilingual RESTful web API resources


If your RESTful web API needs to return the resource representations in different languages depending upon the client locale, use the content negotiation offering in HTTP:

  • Clients can use the Accept-Language request header to specify language preferences.

  • While generating a response, the server is expected to translate the messages into the language supported by the client. The server can use the Content-Language entity-header field to describe the natural language(s) of the intended audience.