String Resources

Delphi provides the capability to place string resources directly into Delphi source code using the resourcestring clause. String resources are literal strings (usually those displayed to the user) that are physically located in a resource attached to the application or library rather than embedded in the source code. Your source code references the string resources in place of string literals. By separating strings from source code, your application can be translated more easily by added string resources in a different language. String resources are declared in the form of identifier = string literal in the resourcestring clause, as shown here:

resourcestring ResString1 = 'Resource string 1'; ResString2 = 'Resource string 2'; ...

Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.