943,791 Members | Top Members by Rank

Ad:
Mar 16th, 2009
0

App's with lots of strings. How?

Expand Post »
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.
Reputation Points: 10
Solved Threads: 1
Light Poster
m610 is offline Offline
40 posts
since Oct 2008
Mar 16th, 2009
0

Re: App's with lots of strings. How?

Delphi Or Pascal this is the question...?....
Reputation Points: 132
Solved Threads: 138
Posting Pro
FlamingClaw is offline Offline
559 posts
since Feb 2009
Mar 16th, 2009
0

Re: App's with lots of strings. How?

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.
Reputation Points: 10
Solved Threads: 1
Light Poster
m610 is offline Offline
40 posts
since Oct 2008
Mar 16th, 2009
0

Re: App's with lots of strings. How?

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
Last edited by FlamingClaw; Mar 16th, 2009 at 3:24 pm.
Reputation Points: 132
Solved Threads: 138
Posting Pro
FlamingClaw is offline Offline
559 posts
since Feb 2009
Mar 17th, 2009
0

Re: App's with lots of strings. How?

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?
Reputation Points: 10
Solved Threads: 1
Light Poster
m610 is offline Offline
40 posts
since Oct 2008
Mar 19th, 2009
0

Re: App's with lots of strings. How?

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.
Reputation Points: 11
Solved Threads: 11
Junior Poster in Training
jsosnowski is offline Offline
68 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: convert string to array
Next Thread in Pascal and Delphi Forum Timeline: Using keys to exit in pascal





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC