Menu

GetLocalizedString(LocalizedString)

Ron
2006-08-19
2013-04-17
  • Ron

    Ron - 2006-08-19

    Has any thought been given to changing the signature of GetLocalizedString from accepting a string to accepting a LocalizedString constant/enumeration?

    That would allow code like this:

    log.Error(GetLocalizedString("stats no servers"));

    to be replaced with this:

    log.Error(GetLocalizedString(LocalizedString.StatsNoServers));

    and reduce the chance of a typo in the future.

     
    • Tim Gebhardt

      Tim Gebhardt - 2006-08-21

      It's not a bad idea, it's a pretty simple change (although tedious), and I don't think it's breaking since GetLocalizedString is private and people shouldn't even really be able to see that.  I'll log that as a request.

       
      • Tim Gebhardt

        Tim Gebhardt - 2006-08-21

        Hmm, actually after thinking out loud with my last post I think I may just leave it because it's private and outside callers shouldn't need to do anything with the localized strings anyway.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.