Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Ok, so I skipped the embedded part and added the modules lang folder in an init module to get Episerver to read all the xml-files in that file.
public void Initialize(InitializationEngine context) { var localizationService = context.Locate.Advanced.GetInstance<LocalizationService>() as ProviderBasedLocalizationService; if (localizationService != null) { string langFolder = HttpContext.Current.Server.MapPath("~/modules/_protected/My.Plugin/lang"); if (Directory.Exists(langFolder)) { var configValues = new NameValueCollection { { FileXmlLocalizationProvider.PhysicalPathKey, langFolder } }; var localizationProvider = new FileXmlLocalizationProvider(); localizationProvider.Initialize(Constants.ProviderName, configValues); localizationService.Providers.Add(localizationProvider); } } }
And this works just fine and aloows me to easily add more language files if needed.
/Kristoffer
Hi!
I am trying to get the my Episerver plugin language file to work as an embedded resource but no success so far.
My plugin is placed in modules/_protected ths build action is set to Embedded Resource but when I copy everything to my test project I still get the "[Missing text...."].
Do I need to something else to get this to work?
Can I place the my xml file in modules/_protected and have Episerver to read my plugin file instead?
Which way is the right way to do it?
Thanks!
/Kristoffer