C# language ressources and error messages
<p>I will try to explain the best way I can. I am not an experienced programmer.</p>

<p>I am using Visual Studio 2008 and C#</p>

<p>I have ressources files (resx) that contain strings and the equivalent in the language. For example I have:
English.resx
French.resx
With the following entries:</p>

<pre><code>&lt;data name="FileError" xml:space="preserve"&gt;
    &lt;value&gt;There is a problem with the file : &lt;/value&gt;
&lt;/data&gt;
</code></pre>

<p>and</p>

<pre><code>&lt;data name="FileError" xml:space="preserve"&gt;
    &lt;value&gt;Il y a un probleme avec le fichier : &lt;/value&gt;
&lt;/data&gt;
</code></pre>

<p>Then I have the following class:</p>

<pre><code>static class Language
{
    public static string FileError;

    Language(string setLanguage)
    {
        switch (setLanguage)
        {
            case "ENGLISH":
                FileError = English.FileError;
                break;
            case "FRENCH":
                FileError = French.FileError;
                break;
            default:
                break;
        }
    }
}
</code></pre>

<p>All of this so I can code the following way:</p>

<pre><code>Language currentLanguage = Language((new ServiceConfiguration()).LanguageString)
...
try
{
 File.AppendAllText("Writing...");
}
catch (Exception fileError)
{
 Console.Write(currentLanguage.FileError + fileError.Message);
}
</code></pre>

<p>Here it doesn't seem like much because there is only one message, but is there any better way I could do this ? It doesn't seem to be too dynamic, and it looks like every time I will want to add a string I will have to recode it to multiple places, please advice a better way to do this.</p>

<p>Thank You.</p>
