Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
perezjquim
Explorer
3,565
Hello everyone,

 

In this blog I'll share with you a helpful strategy I came up with along my Fiori development jouney - reutilizing standard i18n texts.

 

Introduction


Over the course of a Fiori app development, I was bored of writing some of the most commonly-used labels in the i18n files (like Dialog labels - e.g. "Close", "Confirm"), over and over, app after app.

I thought to myself "How can I overcome this?".
Then I decided to experiment to include an i18n file from the UI5 libraries in the app manifest and try it out.

Guess what - it worked 😊

 

How-to


Basically, all you need to is the following:


  • Utilize the standard i18n model as you would use your default i18n model - for example:






Note: this does work in any type of UI5 development (UI5 freestyle app, SAP Fiori Elements app, SAP Fiori Launchpad plugin, etc).

 

Advantages



  • Cleaner/Smaller custom i18n files

  • Less translation effort (since you'll be reutilizing standard texts, all their translations will be also reutilized with no effort)


 

Disadvantages


None 😊

 

Conclusion


To sum up, by referencing SAP i18n resource bundles, we end up reutilizing existing i18n texts in the UI5 framework, reducing and leading to cleaner Fiori solutions.

 

 

Any questions/comments/suggestions?

Feel free to leave them down below.

 

For more UI5-related resources, feel free to:
- Follow the UI5 topic > https://community.sap.com/topics/ui5
- Post/answer UI5-related questions > https://answers.sap.com/tags/500983881501772639608291559920477
- Read other UI5-related posts > https://blogs.sap.com/tags/500983881501772639608291559920477

 

Best regards,

Joaquim Perez
2 Comments
Labels in this area