Show TOC

Binding Texts to a Resource BundleLocate this document in the navigation structure

To bind texts of a control in JSON views to a language-dependent resource bundle, define the resource bundle by a name (resourceBundleName property) or a URL (resourceBundleUrl property) and assign an alias (resourceBundleAlias property) for the bundle in the view definition.


The ResourceModel required for binding these texts is created during view instantiation. The model is set as secondary model with the given alias to the view instance. If you want to bind other properties to another model, you have to create the model on your own in the corresponding controller or HTML page and attach it to the view with another alias. The binding itself behaves in the same way as every SAPUI5 data binding and as described above.


  1. Define the following resource bundle content: MY_TEXT=Hello World
  2. To bind this resource bundle content, insert the following code depending on the view type:
    • For a JSON view, insert the following code:
      {	"Type": "sap.ui.core.JSONView",
       	"content": [{
             			"press": "doIt"
    • For a XML view, insert the following code:
      <core:View resourceBundleName="myBundle"
                 controllerName="sap.hcm.Address" xmlns="sap.ui.commons" xmlns:core="sap.ui.core"
            <Button text="{i18n>MY_TEXT}"/>