[prev] [prev-tail] [tail] [up]

### 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:

Const
help = ’With a little help of a programmer.’;
Var
A : AnsiString;
begin
{ lots of code }
A:=Help;
{ Again some code}
TranslateStrings;
{ 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 …

[prev] [prev-tail] [front] [up]