title: Localization of Text File resources in .NET
body: <p>Localization/Globalization is pretty easy in Visual Studio using RESX files. I just add a resource file, like <code>MyTextSnippets.resx</code>, add key/value pairs, and create copies for every language I'd like to support like <code>MyTextSnippets.de.resx</code>, <code>MyTextSnippets.fr.resx</code> etc.</p>
  
  <p>Now think of longer texts, where the String resource editor grid doesn't work very well. No problem, just choose "Add Resource | Add New Text File" from the designer, and you can edit as many text files as you want. Example: I add <code>MyTemplates.resx</code>, and to this RESX I add a file called <code>SomeEmailTemplate.txt</code>. Works fine so far, however when a create a copy of the resx file, say <code>MyTemplates.de.resx</code>, and open <code>SomeEmailTemplate.txt</code> from there, it will open <em>always the same file</em>. If you look at the details, the text file will not be embedded in the resx container, but it is created in a global folder "Resources", and the resx files just hold a reference, all to the same file.</p>
  
  <p>I can't figure out how to localize it. Any idea?</p>
  
  <p>Of course, I could embed add a text file for every language, and at runtime, enumerate the available text files and try to find the best match for UI culture of the current thread. However this doesn't feel right, as all that magic is available out of the box for strings and designer properties.</p>