grpc-spring icon indicating copy to clipboard operation
grpc-spring copied to clipboard

Locale Support

Open bander-saeed94 opened this issue 2 years ago • 1 comments

What is the appropriate way to change locale to return from messageSource the correct language .

Google suggest:

By default, the API service should use the authenticated user’s locale or HTTP Accept-Language header or the language_code parameter in the request to determine the language for the localization.

bander-saeed94 avatar Sep 14 '22 05:09 bander-saeed94

That is not yet supported, can you tell me how it is done in spring web? Or just spring in general?

You could use a ServerInterceptor to access the headers and configure the message source accordingly.

ST-DDT avatar Sep 14 '22 07:09 ST-DDT