Standard texts are available in the generic framework (for example, the button texts for draft concepts) and belong to the template components (for example, list report and object page). The following sections describe how you replace texts in your generated apps.
When you have created your specific application component, standard texts are available from a specific template component and from the generic template component.
Standard texts can be overwritten by application-specific texts.
Perform the following steps to replace the standard UI texts:
Find or add a resource file to your application.
Search for the text that you would like to change.
Copy the corresponding key and text to your resource file.
Adapt the text as required.
To save translation costs, do not copy and redefine more texts than needed.
Application developers can override the texts that come from annotations. To do so, the annotation must refer to the i18n key that is used in the application’s i18n file:
List Report Without Variant Management
LineItem : [ { $Type : 'UI.DataFieldForAction', Label : 'Add random item', Action : 'com.c_salesordermanage_sd.AddRandomItem' }, { $Type : 'UI.DataFieldForAction', Label : '{@i18n>CopyActionText}', //i18n key referred here Action : 'com.c_salesordermanage_sd.CopyItem' }, . . . ]
For the annotation example above, the application’s i18n properties file must
have the key CopyActionText=Copy Selected Item
.
When you have created your specific application component, for example,
in SAP Web IDE or in SAP
Fiori tools, standard texts are available from a specific template
component (for
example, i18n file within
sap.suite.ui.generic.template.ListReport
)
and from the generic template
component
(for example, i18n file within
sap.suite.ui.generic.template.lib
).
Texts from the Generic Application Component cannot be replaced.
You can also use SAP Fiori tools for SAPUI5 versions higher than or equal to 1.52 to build your apps.
Please note that once you’ve decided which option to use to build your app, you can no longer switch.
SAP Web IDE automatically generates the following folders and files when you create an app with SAP Fiori elements:
<root-folder>
|—i18n
|—<shortened template component name>, for example, List Report and Object Page
|—<entitySet>
|—i18n.properties
This file contains instructions on how to find the standard UI texts for your application. You need them for the step How to Replace the Standard UI Texts with Application-Specific Texts in this topic.
The folder path to the resource model appears as shown below. Since the
manifest.json
file also refers to the title and description
of the app, there is a general i18n.properties
file on the
top level:
i18n.properties
i18n/ListReport/<entitySet>/POHeaders/i18n.properties
i18n/ObjectPage/<entitySet>/i18n.properties
i18n/ObjectPage/<subEntitySet>/i18n.properties
For object pages, the number of i18n files corresponds to the number of object pages defined in the app.
The app descriptor (manifest.json
file) of an
application
specifies the
SAPUI5
models.
Example:
"sap.ui5": { ... "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "uri": "i18n/i18n.properties" }, "i18n|sap.suite.ui.generic.template.ListReport|POHeaders": { "type": "sap.ui.model.resource.ResourceModel", "uri": "i18n/ListReport/POHeaders/i18n.properties" }, "i18n|sap.suite.ui.generic.template.ObjectPage|POHeaders": { "type": "sap.ui.model.resource.ResourceModel", "uri": "i18n/ObjectPage/POHeaders/i18n.properties" }, "i18n|sap.suite.ui.generic.template.ObjectPage|POItems": { "type": "sap.ui.model.resource.ResourceModel", "uri": "i18n/ObjectPage/POItems/i18n.properties"
The URL reflects the folder path to the resource model. The model's name,
i18n|sap.suite.ui.generic.template.ObjectPage|POHeaders
, is
separated by lines used to identify the specific template component and entity
set for which the resource model can be enhanced by editing the
i18n.properties
file.
To replace the standard UI texts, perform the following steps:
Go to the final block of the standard UI texts that starts as
follows: #---Final block: texts to be redefined by the
application -------
Copy this block to the corresponding i18n property file of your app
under webapp/i18n
.
Consider the detailed instructions that you may find as comments in the original property file: For example, a text might be relevant only for the root object, or it might also be relevant for detail pages of subitems. In the latter case, if you have defined multiple object pages in your app, you have to copy and adapt each of them.
After copying the blocks to the relevant files, adjust the texts as described in the comment. For example, replace the generic text object by your entity type name.
When you have created your specific application component, standard
texts are available from a specific template component
(sap.fe.templates
) and from the generic template component.
The applications can currently choose to override any key from the list below. Please check the last column in the table below for a recommendation about which default texts to override. Only the keys given below are allowed to be overridden by the application developer using this custom i18n file approach:
Key | Default Text in SAP Fiori Elements | Used In | Recommendation |
---|---|---|---|
|
Do you really want to perform this action? |
Title of the confirmation dialog that comes up when a user clicks on an action that requires confirmation. |
Applications should overwrite the default text with a shorter version, or should specify the concrete action. |
|
OK |
Button text to confirm the dialog that opens for confirmation actions and action parameter dialogs. |
Applications should overwrite with the action name. |
|
Invalid entry |
Error message for the field left empty in the action parameter dialog. |
Applications should overwrite the default text with a more specific message. |
|
Cancel |
Cancel button text on the action parameter dialog. |
|
|
This object is currently being edited by {0}. |
Draft information text displayed to a user for an object that is already being edited by another user, provided that the information about the owner is available. |
Applications should overwrite the default text with the concrete object that is being edited. |
|
This object is currently being edited by another user. |
Draft information text displayed to a user for an object that is already being edited by another user, when no information about the owner is available. |
Applications should overwrite the default text with the concrete object that is being edited. |
|
This object has unsaved changes made by {0}. |
Information about the user who has made the unsaved changes or who is currently editing the draft, provided that the information about the user making the changes is available. |
Applications should overwrite the default text with the concrete object that is being edited. |
|
This object has unsaved changes made by another user. |
Information about the user who has made the unsaved changes or who is currently editing the draft, when no information about the user making the changes is available. |
Applications should overwrite the default text with the concrete object that is being edited. |
|
An error occurred while submitting the changes. Please navigate back to discard the changes or try to submit the changes again. |
Error message while saving an object. |
|
|
The entered data could not be saved. |
Error message short text when a user enters a value in the field of an object page. |
|
|
This can happen due to technical reasons, for example you are not connected to the internet, a back-end component is not available, or an underlying system is down. Please try again later. |
Error message description/detail text when a user enters a value in the field of an object page. |
|
|
Delete this {0} ({1})? |
Delete message on pressing the delete button on object or
subobject page. ({0} refers to the title, that is,
If no description is provided, then the text should be "Delete this {0}?". |
|
|
Delete this object? |
Generic delete popover message for selected object. |
Applications should overwrite the default text with the concrete object. |
|
Another user edited this object without saving the changes: {0}. Delete anyway? |
Warning message on the delete popover in case the user tries to delete an object that has unsaved changes from another user. |
Applications should overwrite the default text with the concrete object. |
|
Other users have edited the selected objects without saving the changes. Delete anyway? |
Warning message on the delete popover in case the user tries to delete multiple selected objects that have unsaved changes from another user. |
Applications should overwrite the default text with the concrete object. |
|
Delete the selected objects? |
Generic delete popover message for multiple selected objects. |
Applications should overwrite the default text with the concrete objects. |
|
{0} of {1} objects cannot be deleted. |
Warning message on the delete popover when certain objects (from multiple selected objects) cannot be deleted. |
Applications should overwrite the default text with the concrete objects. |
|
{0} of {1} objects are currently locked. |
Warning message on the delete popover when certain objects (from multiple selected objects) are locked and can be deleted by clicking the Delete button. |
Applications should overwrite the default text with the concrete objects. |
|
{1} of {0} objects is currently locked. |
Warning message on the delete popover when an object (from multiple selected objects) is locked and can be deleted by clicking the Delete button. |
Applications should overwrite the default text with the concrete object. |
|
The remaining object has unsaved changes. Do you still want to delete it? |
Warning message text on the delete popover when a user tries to delete an object that has unsaved changes. |
Applications should overwrite the default text with the concrete object. |
|
The remaining objects have unsaved changes. Do you still want to delete them? |
Warning message text on the delete popover when a user tries to delete multiple selected objects out of which more than one have unsaved changes. |
Applications should overwrite the default text with the concrete object. |
|
Also delete object with unsaved changes? |
Confirmation message to be appended with
|
Applications should overwrite the default text with the concrete object. |
|
Also delete objects with unsaved changes? |
Confirmation message to be appended with
|
Applications should overwrite the default text with the concrete objects. |
|
{0} out of {2} objects cannot be deleted. {1} of {2} objects are currently locked. |
Warning message on the delete popover when none of the selected objects can be deleted - some because the delete operation is not allowed on them, and some because the object is locked. {0} refers to the number of objects that do not allow the delete operation. {1} refers to the number of objects that are locked and therefore cannot be deleted. {2} refers to the total number of objects selected. |
Applications should overwrite the default text with the concrete objects. |
|
{0} out of {1} objects cannot be deleted. 1 of {1} objects is currently locked. |
Warning message on the delete popover when none of the selected objects can be deleted - exactly 1 object is not deletable in this case because the object is locked; the rest of the selected objects cannot be deleted because they do not allow the delete operation. {0} refers to the number of objects that do not allow for the delete operation. {1} refers to the total number of objects selected. |
Applications should overwrite the default text with the concrete objects. |
|
Object was deleted |
Message toast text when an object has been deleted successfully. |
Applications should overwrite the default text with the concrete object. |
|
Objects were deleted |
Message toast text when multiple objects have been deleted successfully. |
Applications should overwrite the default text with the concrete objects. |
|
Cancel |
Cancel button text on the object page. |
|
|
Object was saved |
Message toast text that is displayed after a user clicks the Save button on the object page. |
Applications should overwrite the default text with the concrete object. |
|
Discard all changes? |
Discard button popover text on the object page when there are unsaved changes and the user clicks Cancel. |
|
|
Discard |
Discard button text on the object page when there are unsaved changes and the user clicks Cancel. |
|
|
To start, set the relevant filters. |
Text that is shown on a table and chart when they are loaded but no search has been triggered yet. |
|
|
No data found. Try adjusting the search or filter parameters. |
Text that is shown on a table and chart when a search is triggered but no data could bee found with the current filter settings. |
|
|
Navigation is currently not possible. |
Text that is shown when the navigation cannot be completed successfully. |
|
|
(Unnamed Object) |
Default header title for the object page if no header information is available. |
|
|
Another user edited this object without saving the changes: {0} Edit anyway? |
Text that is shown in the confirmation dialog box when a user clicks the Edit button on an object page that has unsaved changes made by another user. ({0} refers to the user name.) |
Applications should overwrite the default text with the concrete object. |
|
Another user edited this object without saving the changes: {0} Delete anyway? |
Text that is shown in the confirmation dialog box when a user clicks the Delete button on an object page that has unsaved changes made by another user. ({0} refers to the user name.) |
Applications should overwrite the default text with the concrete object. |
|
New |
The default text "New" is appended with
|
Provide the new custom texts in this custom resource bundle with the same key as the one used by SAP Fiori elements (from the allowed list provided above). For example:
SAP Fiori elements default values (resource bundle of SAP Fiori elements):
C_OPERATIONS_ACTION_CONFIRM_MESSAGE=Do you really want to
perform this action?
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_PLURAL=Delete
the selected objects?
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR=Delete
this object?
Text values from i18n/customSalesOrderLR.properties
(custom resource bundle of the application):
C_OPERATIONS_ACTION_CONFIRM_MESSAGE|SalesOrderManage|ReturnInProcess=Can
you please confirm if you really want to trigger the
returns?
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_PLURAL|SalesOrderManage=Do
you want to delete the selected Sales Orders?
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR|SalesOrderManage=Do
you want to delete this Sales Order?
Since the application has defined new texts for the above-mentioned resources, while triggering the confirmation action Returns in Process, we see the custom text: "Can you please confirm if you really want to trigger the returns?" instead of "Are you sure that you want to execute this action?" in the action parameter popup.
Changes must be made in the manifest file of the application. Add
enhanceI18n
to the settings
of the
corresponding section as shown below:
{ ... ... "targets": { "SalesOrderManageList": { "type": "Component", "id": "SalesOrderManageList", "name": "sap.fe.templates.ListReport", "options": { "settings": { "entitySet": "SalesOrderManage", "enhanceI18n": "i18n/customSalesOrderLR.properties", // This is the line to be added - it provides Fiori Elements with the name of the custom resource bundle ... ... ... } } } } ... ... }
For resources which are not shared across multiple entities or by multiple controls (for example, you want the same OK text in all OK confirmation popovers), do not append anything to the existing key.
C_COMMON_DIALOG_OK=OK?
(resource bundle of SAP Fiori
elements)
C_COMMON_DIALOG_OK=Okie?
(custom resource bundle of the
application)
For resources which are shared across multiple entity sets, append the
entitySet
name. For instance, you want different delete
messages based on the entity being deleted.
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR=Delete
this object?
(resource bundle of SAP Fiori elements)
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR|_Items=Do
you want to delete this Sales Order Item?
For overriding actions that have parameters, some of the text in the action parameter popovers can be overridden. Confirmation actions also get a confirmation popover which has text that can be overridden. To override these texts, the action name along with the entity set name has to be provided. The entity set name is a mandatory piece of information, even if the application needs the custom text for an action that is used in only one entity set. If the entity set name is not appended, the resource bundle text from SAP Fiori elements will be used as a fallback.
C_OPERATIONS_ACTION_CONFIRM_MESSAGE=Are you sure that you want to
execute this action?
(resource bundle of SAP Fiori elements - this text will be shown for all confirmation actions, irrespective of the action name or the entity)
C_OPERATIONS_ACTION_CONFIRM_MESSAGE|SalesOrderManage|ReturnInProcess=Can
you please confirm if you really want to trigger the
returns?
In the above example, the developer wants to show the custom message only when a
user clicks the ReturnsInProcess
action of the
SalesOrderManage
entity set. For a second action in the
same entity set the last part of the key will be different, since the action
name will be different.
If the action name is the same but the entity differs, then the second part of the key name above will be different and SAP Fiori elements will, based on the entity set to which the clicked action is associated, use the correct key.
C_OPERATIONS_ACTION_CONFIRM_MESSAGE|_Items|ReturnInProces=Can you
please confirm if you really want to trigger the returns for the chosen
items?
In SAP Fiori elements for OData V4, you use SAP Fiori tools to build your apps.
For more information, refer to their
.