9.5 Caveat

In principle it is possible to translate all resource strings at any time in a running program. However, this change is not communicated to other strings; its change is noticed only when a constant string is being used.

Consider the following example:

  help = ’With a little help of a programmer.’;  
  A : AnsiString;  
  { lots of code }  
  { Again some code}  
  { More code }

After the call to TranslateStrings, the value of A will remain unchanged. This means that the assignment A:=Help must be executed again in order for the change to become visible. This is important, especially for GUI programs which have e.g. a menu. In order for the change in resource strings to become visible, the new values must be reloaded by program code into the menus …