Created
January 13, 2015 21:43
-
-
Save jonathanread/42bccec0b468b4f97152 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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