title: How should I structure resource bundle property files which are used by jsps?
body: <p>I am currently working on converting an existing web application to support an additional language (namely Welsh). My proposed approach is to extract all displayed text into property files and then access the text using JSTL fmt tags.</p>
  
  <p>My question is: how should these property files be structured? I know they need to be on the classpath for the web application, but rather than storing them directly in WEB-INF/classes I would prefer to copy them there during the build step. This leaves me a lot of flexibility in how to store the files in subversion. Since they are closely aligned with the jsps is it a good idea to create a new top-level directory (e.g. resources) and mirror the jsp structure under this folder? This would give me a structure like </p>
  
  <pre><code>resources/jsp/index.properties
  resources/jsp/index_cy.properties
  </code></pre>
  
  <p>This seems like a reasonable approach and it is extensible to property files for classes too, if they should be required:</p>
  
  <pre><code>resources/com/mycompany/myapp/CustomObject.properties
  resources/com/mycompany/myapp/CustomObject_cy.properties
  </code></pre>
  
  <p>The build process could then copy all of these files into WEB-INF/classes ready for packaging into the war file.</p>
  
  <p>Is this approach in line with industry standards? This is the first multilingual application for my current company, so it is likely to be used as a blueprint for all others. </p>
  
  <p>Edit: It has been pointed out that this approach could lead to a lot of duplicated strings in the various property files. While this is true, it would only be as many duplicated strings as currently exist in the jsps. Is it better to have a clear mapping from jsp to property files, at the cost of some duplication in the property files?</p>