SAP-docs / sapui5

This is the markdown version of the official SAPUI5 documentation from the SAPUI5 Demo Kit for external contributions.
Creative Commons Attribution 4.0 International
71 stars 116 forks source link

[doc issue] Localization of UI Texts #113

Closed ProFreak closed 3 months ago

ProFreak commented 4 months ago

Issue description

Edit: correction of the typo in "sap-language"

Hello,

I have noticed an issue with the ABAP CDS Localization of UI Texts. It is about the following SAP documentation :

I have tried to implement it as described an I am using a List Report to display some demo data from the new flight data model.

I defined the line item in a Metadata Extension file: @UI.lineItem: [{position: 70, label: '{i18n>TotalPrice}'}] TotalPrice;

And added the key-value pair into the i18n.properties file. To this point, everything works perfectly fine.

But when i add another i18 file, in my example for the german langauge e.g. i18n_de.properties the language specific Text is not read and the standard sap-label (if existent) or the datafield name is shown wen loding the app in the preview (BTP BAS) with url parameter sap-language=de .

Changes to the app title are working fine. And the text is availiable in the networktab in the Browser DevTools. So I think this is an issue with the SAPUI5 Framework...

My expectation would be, that the localization via CDS annotation is also working for every other langauge file. Otherwise this way of implementation would not make sense.

Feedback Type (Optional)

other

Page Title on SAP Help Portal (prefilled)

Localization of UI Texts

Page URL on SAP Help Portal (prefilled)

https://sapui5.hana.ondemand.com/sdk/#/topic/b8cb649973534f08a6047692f8c6830d

KvM2 commented 4 months ago

Hi @ProFreak , thanks for your contribution . We appreciate it and will look into this.

JannaLisa commented 3 months ago

Hello @ProFreak, my architect and I have checked your question. First of all, this is not a documentation issue ;-) The feature is supported across all languages. Then, we noticed a typo in the URL parameter for German ("wen loding the app in the preview (BTP BAS) with url parameter sap-langauge=de") - could that be part of the issue? Since to investigate further, our developers would require you to share some code, we would like to direct you to https://answers.sap.com/index.html . Please post your question there, since it is a technical environment where experts can support you. Hopefully your query can be answered there. Thanks!

ProFreak commented 3 months ago

Hello @JannaLisa,

unfortunately the typo in my text is not the reason 😄. I did it correct in the URL. I also tried adding an "@" in '{@i18n>TotalPrice}". I will post my question there, thanks for the Information and confirmation that I ain't alone with my expectation.

JannaLisa commented 3 months ago

Hi @ProFreak , thanks, I hope our technical experts will be able to help you. I'm closing the issue here since we agree it's not a documentation-related issue. All the best!