Delphi resource string file (.drc) is used by Sisulizer to get the complete resource string context of the items.
When Delphi compiler compiles a resourcestring it stores the string is a standard Windows string resource and assigns an id for the string. If you add new resourcestrings into the application or delete existing ones, the compiler will give most resourcestrings new ids. This will most likely cause loss of translations or a existing translations to be replaced with wrong translations. To prevent this give a DRC file name so Sisulizer can use it to link resource string variable names and resource string ids (e.g. SSampleString equals 4567). The resource string variable name will change only if the programmer will intentionally change the resourcestring variable name. DRC files use .drc file extension (e.g. C:\Samples\Project1.drc).
You can localize a Delphi binary file without specifying the DRC file but in that case Sisulizer can not use resource name as context ids. Possible context methods are:
|String value||Sisulizer uses string values as context values. This is safe even if you modify and recompile your application. However if the application has the same text in two ore more resource strings this method brings only one row to the project file. So all instances of the same text will share the same row and you can no longer translate them in a different way.|
|Resource id||Sisulizer uses resource ids as context values. This is potentially dangerous because it is very likely that Delphi compiler will change the resource strings ids next time you compile your project. This will cause lost of translations or switching of existing translations. Both are very hard to fix.|
Because both alternative context methods have their limitation and dangers it is very much recommended to specify a DRC file. To create a .drc file choose Project | Options | Linking from Delphi and select Detailed in the Map file selection. In Delphi XE2 or later you can also turn DRC files on by checking Output resource string .drc file check box.
For an example let's look at SelectFile.pas that has the following resource string.
resourcestring SBrowseFile = '&Browse...';
The following table shows how the context is generated in each context method.
As you can see the resource id context id does not give any meaningful information (4096.65520) for translator. The string value method also does not give any additional information compared to the string value (&Browse... vs. &Browse...). The resource name method gives extra information (SelectFile.SBrowseFile) in addition of the string value.
If you use FireMonkey and you localize also your Mac file you must use DRC files. You need to specify both the Windows and Mac DRC file in the source options. Learn more about Mac localization.