In Delphi, you can declare strings that will be stored in the string table of the module resource section.
resourcestring rsExample = 'Example';
At compile time, Delphi assigns an identifier to it and saves it in the row table.
Is there a way to get the id of a string declared as a resource?
The reason is because I use a package that works just like gnugettext. Some functions in System.pas (for example, LoadResString) are connected, so when I use resourcestring in the expression, it will be replaced with another line (translation). Of course, this is very convenient, but sometimes I need the original (untranslated) resource text.
When I can get the string resource identifier, I can call the LoadString API to get the source text instead of the translated text.
source share