c# - ASP.NET Resourcemanager to read local .resx -
I am using embedded .resx files for my translations, with some of these translations I have another .resx file I want to override, which is not embedded (e.g., ~ / App_Localresources / translations.en-US.resx).
The purpose of this is that after the application is compiled and deployed, Manually convert .resx files to override embedded translations.
Use the General Resource Manager for this? (In .NET 4)
Thanks for the tips
public Class ResxResourceManager: System.Resources.ResourceManager {Public ResxResourceManager (string basename, string processing directory) {type [param paramy] = new type [] {typef (string), typef (string), typef (type)}; Object [] paramValues = new object [] {baseName, sourceDir, typeof (ResXResourceSet)}; Type the base type = GetType (). BaseType; ConstructorInfo ci = baseType.GetConstructor (BindingFlags.Instance | BindingFlags.NonPublic, Zero, Permataps, Null); Ci.Invoke (this, paramValues); } Secure Override string GetResourceFileName (CultureInfo Culture) {string resourceFileName = base.GetResourceFileName (culture); Return resource filename Change (".resource", ".resx"); }}
Comments
Post a Comment