I have all the GUI string in one Resource file which i've already had translated.
The way I'd like to implement it is to use the Resource.designer.cs code to call the strings.
This would allow me to use intelisense to find the strings. Currently my code can do this with the english resource file. I can call Resources.ErrorApplicationerror to get the string.
The problem is that since the classes generated in the designer class do no inherit from a common source I can't change the Reources variable to point to any of the other languages.
I would try to make an interface that implements all the strings, but the Resources class members are implemented as statics so its not allowed.
Any ideas? I feel i must be missing something.
Resources.Designer.cs implementation:
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
...
/// <summary>
/// Looks up a localized string similar to Application Error Occurred.
/// </summary>
public static string ErrorApplicationerror {
get {
return ResourceManager.GetString("ErrorApplicationerror", resourceCulture);
}
}

New Topic/Question
Reply




MultiQuote



|