#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Posts
    84
    Rep Power
    6

    Reading text file into either array or variable?


    Hello there guru's,

    I'm tired of having to recompile a project everytime colleagues find spelling errors or wrong labelling within the program, so I have decided to put these values into a *.cfg (config)/*.def(definition) file that sits in the installation directory.

    Is there a 'preferred' method of achieving this, as I'm not exactly sure on how to do this - I was going to read the entire file into a single variable then use a delimiter to split them into an array - BUT I would prefer to use an associative array for limiting ambiguity..

    Could someone give me an Idea of how to proceed with this..

    Thanks,

    MRb
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    144
    Rep Power
    17
    http://www.codeproject.com/Articles/5447/NET-Localization-using-Resource-file

    I would look into that. Usign the resource file is a fairly clean way to organize text strings

IMN logo majestic logo threadwatch logo seochat tools logo