title: Is there a semi-automated way to perform string extraction for i18n?
body: <p>We have a Java project which contains a large number of English-language strings for user prompts, error messages and so forth. We want to extract all the translatable strings into a properties file so that they can be translated later.</p>
  
  <p>For example, we would want to replace:</p>
  
  <p><em>Foo.java</em></p>
  
  <pre><code>String msg = "Hello, " + name + "! Today is " + dayOfWeek;
  </code></pre>
  
  <p>with:</p>
  
  <p><em>Foo.java</em></p>
  
  <pre><code>String msg = Language.getString("foo.hello", name, dayOfWeek);
  </code></pre>
  
  <p><em>language.properties</em></p>
  
  <pre><code>foo.hello = Hello, {0}! Today is {1}
  </code></pre>
  
  <p>I understand that doing in this in a completely automated way is pretty much impossible, as not every string should be translated. However, we were wondering if there was a semi-automated way which removes some of the laboriousness.</p>