cancel
Showing results for 
Search instead for 
Did you mean: 

How localization of data happens automatically in SAPUI5 CAPM ?

VenkyM
Participant
0 Kudos

Dear Experts,
Greetings!
We have UI5 free style apps and we are using NodeJS stack CAP framework for backend.
All our apps are in SAP Fiori launchpad and when I change language from settings menu from English to German, all the table columns are translated to German since we are maintaining i18n files for this and this is expected.


But the data inside the table also changing to German format (, separator) and I am not sure how it is happening.
Could anyone help me to understand how this data also getting formatted to corresponidng language?
I checked at UI level and we are not using any formatters for this.

Thanks in advance.

Regards,
Venkatesh.

View Entire Topic
junwu
Active Contributor
0 Kudos
VenkyM
Participant
0 Kudos

Hi jun.wu5 ,
Thanks for your response.
I am not using anywhere custom data types or Data Types of SAPUI5. But the data formatting happens at UI , I am not sure if CAP framework is taking of this or not automatically.
If CAP framework takes care of it then it should format all the data and in all places but not happening.
I am in doubt whether any backend CDS declaration(for example @localized for strings) is needed or not .

Regards,
Venkatesh

junwu
Active Contributor
0 Kudos

don't get confused with custom data type.

I am just using that to show how data type works. sap standard data type will also have that format built in.

it is pure UI5.

VenkyM
Participant
0 Kudos

Hi jun.wu5 ,
Thanks for clarifying.
Ok, I understood what you are trying to explain.
If standard Data type (example, Decimal in CDS entity declaration) is translating this data then it should happen for all the data in my apps but this is not happening.

I want to know if there is something in CAP o take care of this.

Regards,
Venkatesh.

junwu
Active Contributor
0 Kudos

no, it is frontend thing if I am not wrong.

the data type I am talking is the data type in ui5, not your backend data type.

you can use ui5 inspector to check the data type used in your binding

if your ui text is not translated to locale specific string, probably your binding doesn't have data type information.

for example: it shows you how to find the data type for the binding of your ui control.

VenkyM
Participant
0 Kudos

Hi jun.wu5 ,
I verified the type of the value and it is undefined for it but value is formatted.
Please find the attached screenshot for your reference.

Regards,
Venkatesh