Getting my feet wet with localization, I found that the use of Resourcestring is not supported in objectivec1 or objectivec2 mode.
ObjectiveC1 and
ObjectiveC2 are
not modes. They are
modeswitches which means they are used in conjunction with one of the modes (or the default mode).
To confirm: Doing some tests, I see there are not a single is being added to the .po file, when enabling i18n, for any of my objectivec1 or objectivec2 units in my application. Regular units (mostly objfpc mode) however are included.
The compiler does not deal with
po-files. It generates
rsj-files for each unit that contain all the resourcestrings of the corresponding unit. These can then be converted to
po-files using the
rstconv utility provided together with FPC. I don't know what Lazarus'
I18n option does behind the scenes.
Wouldn't it be desirable that Resourcestring works for all modes as it seems the recommended method for localization?
Resource strings can be declared in all modes except
ISO and
ExtPas, because
resourcestring is not a reserved keyword in those modes. The documentation simly isn't quite up to date regarding that (because in the past it required the
Class modeswitch which is provided by defaul by modes
ObjFPC,
Delphi and
DelphiUnicode).