If I have a single label on my ASP.NET (2.0) page, and I want to store an error message in it; and if I do that in code by making multiple IF statements, like:
if (...)
value = "..."
else
value = "......"
etc
how would I localize this, so that I don't have to write:
if (...)
{
switch(langCase)
{
case "en-US":
value = "englishValue";
break;
case "de-CH":
value = "german Swiss value";
break;
...
}
}
else
{
switch(langCase)
{
case "en-US":
value = "englishValueForElse";
break;
case "de-CH":
value = "german Swiss value for ELSE";
break;
...
}
}
If I create multiple label controls for each if-else case, I will have to hide all but the one for the current language (ugly? ). What I would like is a kind of resource file, but with rows for each case that could happened, and columns for each language needed.