I've got a lot of text to display in an app I am working on. I know that this eats of resources so I'd like to put them somewhere else, like maybe a file that I stuff into the resource file, if that is possible. Also, I'm thinking to the future where I do a multi-language version.

So my question, how is this generally done? Do I move the text to a file and store it in the resource file? Does this file include text-line numbers that my app would use to locate the string it needs, etc.?

That's how I figure it is done, but I have no idea of how people actually do it. How is it done?


7 Years
Discussion Span
Last Post by jsosnowski

Delphi. Sorry.

And obviously I don';t want to put the strings in a text file that someone can get at, or loose.

I guess a DLL is another possibility.


Thanks. I could probably use a DLL that contains one function and all it does is return a string from a massive string constants array. That would work better than creating a text file and searching through it to find a string, such as searching for a string that starts with an ID code, then grabbing the rest of it.

My basic concern is using up data space in my app with all these strings. Does moving these strings/string array to a separate DLL help me get around that problem?


Another possibility would be to create a small database structure and placing the items in a database file. IF you have not explored database managment in Delphi yet, then this would be a good opportunity to do so.

You may also want to reconsider the idea of user access. Many programs store all text prompts in separate files to allow easy conversion between languages. In some commercial programs, it is possible to modify these text strings to customize them for applications or terminaology within a company. Also, if a user is going to loose a file he is no more likely to loose a text file than the dll you create and can always restore the oringal to his directories if he/she does.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.