I am working on REST server side.
I will update the error_code
and error_message
in HTTP headers while responding to the client.
This is fine until error_message is static.
e.g. error_code : PC_USER_007
error_message : You are logged out!
Client side will look at the error_code(PC_USER_007)
; in corresponding properties and they will do the localization.
So now the GUI will show you the same error_message in Chinese if the user belongs to China.
If it is dynamic error string like below,
e.g. error_code : PC_USER_008
error_message : You have tried 2 attempts; only 1 attempts is remaining.
Here 2, 1 are dynamic values..
Now GUI side how we can convert this error message to other language.
Any framework (struts, spring...) already supporting this kind of localization?
This is just opposite question to How to replace a set of tokens in a Java String?
Server side i followed the above link; now i want opposite case in client side.