title: How to handle dynamic error string at Client side for internationalization
body: <p>I am working on REST server side.</p>
  
  <p>I will update the <code> error_code</code> and <code>error_message</code> in HTTP headers while responding to the client.
  This is fine until error_message is static.<BR> </p>
  
  <pre><code>e.g. error_code    : PC_USER_007
       error_message : You are logged out!
  </code></pre>
  
  <p>Client side will look at the <code>error_code(PC_USER_007)</code>; 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.</p>
  
  <p>If it is dynamic error string like below,</p>
  
  <pre><code>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..
  </code></pre>
  
  <p>Now GUI side how we can convert this error message to other language. </p>
  
  <p>Any framework (struts, spring...) already supporting this kind of localization?</p>
  
  <p>This is just opposite question to <a href="https://stackoverflow.com/questions/959731/how-to-replace-a-set-of-tokens-in-a-java-string">How to replace a set of tokens in a Java String?</a></p>
  
  <p>Server side i followed the above link; now i want opposite case in client side.</p>