Extract Resource String (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Refactoring Applications Index

Extracting resource strings helps centralize string definitions which can then be more easily translated, if necessary. You can extract string values to resource strings that are defined in the resourcestring section of your code file. If there is no resourcestring section in your code, the refactoring engine creates one following either the implementation keyword or the uses list.

You cannot create a resource string from the following elements:

  • Constants. For example, const A = 'abcdefg'; cannot be extracted to a resource string.
  • Constants in Parameters. For example, in MyProc(A, B:Integer; C: string='test'); the string cannot be extracted to a resource string.
  • Resource Strings. For example, resourcestring A = 'test'; is already a resource string.

See Also