format i18n messages with variables in xml view

<!--format i18n messages with variables in xml view-->
<!--textWithVariables=Lorem {0} Ipsum {1}-->
<mvc:View controllerName="xxx.controller" xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core"
	core:require="{ formatMessage: 'sap/base/strings/formatMessage' }">
	<Button text="{ parts: [ 'i18n>textWithVariables', 'viewmodel>/propertyA', 'viewmodel>/propertyB' ], formatter: 'formatMessage'}"/>
</mvc:View>

Leave a Reply

Your email address will not be published. Required fields are marked *