Cuando usamos archivos resx en .net sea cual sea la aplicación tenemos una utilidad que nos descomplica la vida para poder tener aplicaciones que soporten múltiples idiomas y traducibles, esta ultima se dificulta un poco ya que no tenemos un método para sobrescribir el GetString que tiene el ResourceManager por esto solo nos queda crear un ResourceManager propio y reemplazarlo en el archivo Resx en el designer:
Ejemplo de un ResourceManager personalizado:
<!-- wp:paragraph -->
<p>public class LocalResourceManager : ResourceManager<br>{<br>public string Name { get; set; }</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>public LocalResourceManager(string name, Assembly culture)<br>: base(name, culture)<br>{<br>this.Name = name.Replace("AssemblyName.Localization.", string.Empty);<br>}</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>// override<br>public override string GetString(string name)<br>{<br>// custom code<br>return base.GetString("Hello") + "_Override";<br>}</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>public override string GetString(string name, CultureInfo culture)<br>{</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>return base.GetString(name, culture) + "_Override";<br>}<br>}</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Luego de crearlo podemos reemplazar entonces el ResourceManager original:</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>/// <summary><br>/// A strongly-typed resource class, for looking up localized strings, etc.<br>/// </summary><br>// This class was auto-generated by the StronglyTypedResourceBuilder<br>// class via a tool like ResGen or Visual Studio.<br>// To add or remove a member, edit your .ResX file then rerun ResGen<br>// with the /str option, or rebuild your VS project.<br>[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]<br>[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]<br>[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]<br>internal class ResourceDemo {</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>private static global::ResourceAppDemo.LocalResourceManager resourceMan;</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>private static global::System.Globalization.CultureInfo resourceCulture;</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]<br>internal ResourceDemo() {<br>}</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>/// <summary><br>/// Returns the cached ResourceManager instance used by this class.<br>/// </summary><br>[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]<br>internal static global::ResourceAppDemo.LocalResourceManager ResourceManager<br>{<br>get {<br>if (object.ReferenceEquals(resourceMan, null)) {<br>global::ResourceAppDemo.LocalResourceManager temp = new global::ResourceAppDemo.LocalResourceManager("ResourceAppDemo.ResourceDemo", typeof(ResourceDemo).Assembly);<br>resourceMan = temp;<br>}<br>return resourceMan;<br>}<br>}</p>
<!-- /wp:paragraph -->
EL CÓDIGO COMPLETO EN EL SIGUIENTE LINK:
https://onedrive.live.com/redir?resid=261445BD18D3146D%212507