SAP Knowledge Base Article - Preview

3750004 - SAPUI5 getlanguage() returns locale "en-US" instead of language "en" after upgrading to SAP FIORI FOR SAP S/4HANA 2025

Symptom

  • After upgrading to SAP FIORI FOR SAP S/4HANA 2025, a change was observed with the `sap.ui.getCore().getConfiguration().getLanguage()` function.
  • The function now returns "en-US" instead of "en" as it did in SAP FIORI FOR SAP S/4HANA 2023.
  • This change in the returned value causes a Bad Request (400) error due to field length issues when passing the value to existing service calls. 


Read more...

Environment

  • Product: SAP S/4HANA
  • Core and Runtime

Product

SAP S/4HANA all versions

Keywords

sapui5, getLanguage, en-US, en, bcp47, language tag, getSAPLogonLanguage, getLocale, localization, fiori, 400 bad request, field length, language code, s/4hana upgrade, ui5 configuration , KBA , CA-UI5-COR , Core and Runtime , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.