I have a button (create an application), if I click on the button, a fragmented dialog will appear. here I can show a fragmented dialog. but internalization (i18n) does not appear for fields. (For xml files that can show i18n , but for a fragment.xml file that i18n / cannot show)
component.js :
createContent : function() {
Controller.js :
createApplication: function (oEvent) { if (!this.oDialogFragment) { this.oDialogFragment = sap.ui.xmlfragment("sap.gss.program.view.myFragment", this); } this.oDialogFragment.open(); }
fragment.xml :
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"> <Dialog title="{i18n>Title}" class="sapUiPopupWithPadding" > <HBox> <Text text="{i18n>Description_TEXT}" > </Text> </HBox> <beginButton> <Button text="{i18n>Ok}" press="DialogButton" /> </beginButton> <endButton> <Button text="{i18n>Cancel}" press="CloseButton" /> </endButton> </Dialog> </core:FragmentDefinition>
source share