Skip to content

Instantly share code, notes, and snippets.

@jonathanread
Created January 13, 2015 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanread/42bccec0b468b4f97152 to your computer and use it in GitHub Desktop.
Save jonathanread/42bccec0b468b4f97152 to your computer and use it in GitHub Desktop.
private static ResourceManager resources = ResourceManager.GetManager();
public static string GetLabelOrMessage(string labelGroup, string key)
{
var item = resources.GetResourceOrEmpty(Thread.CurrentThread.CurrentCulture, labelGroup, key);
if (!item.Value.IsNullOrEmpty())
{
return item.Value;
}
else
{
return "Please create your label with type " + labelGroup + " & key" + key;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment