I have the following C# code. For reasons I won\'t go into, this is the required way of localising.
My problem is, I cannot for the life of me figure out what path is no
Maybe you could refactor it so that at the bottom of your code you have a SINGLE return statement. And all your decision-making code simply 'sets' the return value.
Then in your switch(Name) block SET the value of what you want to return - then break out of the switch (rather than having a whole bunch of returns). IMO, this would make the code neater. Also, I think it'd make it easier to maintain.
ie.
switch(Name)
{
case "AppName": retString = ResMain.GetString("$this.Text");
case "MinimizeToTray": retString = "Closing the program minimizes it to the tray. To fully quit the program, right-click the icon in your tray and choose Exit.";
case "ReallyExit1": retString = "Do you really want to exit?";
case "ReallyExit2": retString = "Torrents will not be checked and downloaded until you launch the program again!";
default: retString = "String not found!";
}
...
return retString;