title: Localization testing, formatting all strings with XXXXX
body: <p>We are trying to look at optimizing our localization testing. </p>
  
  <p>Our QA group had a suggestion of a special mode to force all strings from the resources to be entirely contained of X. We already API hijack LoadString, and the MFC implementation of it, so doing it should not be a major hurdle. </p>
  
  <p>My question is how would you solve the formatting issues?</p>
  
  <pre><code>Examples -
  
  CString str ;
  str . LoadString ( IDS_MYSTRING ) ;
  
  where IDS_MYSTRING is "Hello World", should return "XXXXX XXXXX"
  where IDS_MYSTRING is "Hello\nWorld", should return "XXXXX\nXXXXX"
  where IDS_MYSTRING is "Hello%dWorld", should return "XXXXX%dXXXXX"
  where IDS_MYSTRING is "Hello%.2fWorld", should return "XXXXX%.2fXXXXX"
  where IDS_MYSTRING is "Hello%%World", should return "XXXXX%%XXXXX"
  </code></pre>
  
  <p>So in summary the string should work if used in a printf or Format statement, it should honor escape characters.</p>
  
  <p>So this is a pure code question, C++/MFC, </p>
  
  <pre><code>CString ConvertStringToXXXX ( const CString&amp; aSource ) 
  {
     CString lResult = aSource ;
  
     // Insert your code here
  
     return lResult ;
  }
  </code></pre>
  
  <p>I know this could be done using tools on the .RC files, but we want to build English, then run like so -</p>
  
  <p>application -L10NTEST</p>