| | |
App's with lots of strings. How?
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2008
Posts: 35
Reputation:
Solved Threads: 1
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?
Thanks.
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?
Thanks.
I'm not really good in Delphi but I think I can help you a bit
If you click this page then you can read about a way to resolve your problem
http://delphi.about.com/od/windowssh...dll_basics.htm
If you click this page then you can read about a way to resolve your problem
http://delphi.about.com/od/windowssh...dll_basics.htm
Last edited by FlamingClaw; Mar 16th, 2009 at 3:24 pm.
•
•
Join Date: Oct 2008
Posts: 35
Reputation:
Solved Threads: 1
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?
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.
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.
![]() |
Other Threads in the Pascal and Delphi Forum
- Previous Thread: convert string to array
- Next Thread: Using keys to exit in pascal
| Thread Tools | Search this Thread |





