In the UI5 Demo Kit, Walkthrough step 8 (still) mentions the following:
To be on the safe side, we would have to use a similar mechanism as in the controller to use a string from the resource bundle and replace parts of it. This can be done with the
jQuery.sap.formatMessage
formatter.
It can be used for translatable texts with placeholders in XML views e.g.:
<Title text="{
parts: [
'i18n>overflowToolbarTitle',
'appView>/listItemCount'
],
formatter: 'jQuery.sap.formatMessage'
}" />
However, jQuery.sap.formatMessage
is depreciated since 1.58, and if I use instead the suggested alternative sap.base.strings.formatMessage
, the following error is thrown:
formatter function sap.base.strings.formatMessage not found!
How can the new formatMessage
module be used in XML?