Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class ResourcesHelper
{
private readonly IStringLocalizerFactory _stringLocalizerFactory;
public ResourcesHelper(IStringLocalizerFactory stringLocalizerFactory)
{
_stringLocalizerFactory = stringLocalizerFactory;
}
public IEnumerable<LocalizedString> GetResources(string name)
{
IStringLocalizer localizer = _stringLocalizerFactory.Create(name, Assembly.GetEntryAssembly().FullName);
return localizer.GetAllStrings(true).ToList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.