Skip to Content

How to get fiori launchpad language inside a custom application ?

Hi All,

When i log on to fiori launchpad selecting a DE as language and then through tile of custom app i navigate to the my custom ui5 application i do not get the language DE due to which my application does not translate to the desired language.

Using this sap.ui.getCore().getConfiguration().getLanguage() it gives me en as the language and using jquery jQuery.sap.getUriParameters().get("sap-language") it give me null.

Please let me know how can i translate my custom ui5 app to the desired language in fiori launchpad.

Regards,

Rachna Bhati

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Jul 13, 2018 at 10:14 AM

    You can open the Fiori Launchpad (where your app is deployed) with the URL parameter sap-language=DE and the launchpad should automatically be displayed in German. Now if you open your custom app (and provided you have created an appropriate resource bundle file within your project - i18_de.properties to maintain German language specific static texts) you should be able to see the texts translated to German.

    Another option to open the launchpad in German language without explicitly specifying the language in the URL via the sap-language parameter is in the Google Chrome browser's Languages settings page move the German language to the top of the languages list.

    Add comment
    10|10000 characters needed characters exceeded

    • In my case even the data fetched from the backend in my custom app shows up in German if I launch the Launchpad in German language. This happens through the RFC connection which connects the front-end with the back-end; the browser language is propagated through this RFC to the backend and backend returns data in the German language. For this to work the language should be left blank in the RFC destination though.

  • Jul 16, 2018 at 03:10 PM

    is your app running inside flp? or your tile opens a new tab to run your app?

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 18, 2018 at 06:37 AM

    Hi Rachna,

    You can use below method for get user language .

    sap.ushell.Container.getService("UserInfo").getLanguage()

    Follow this page for reference :

    https://sapui5.netweaver.ondemand.com/sdk/#/api/sap.ushell.services.UserInfo

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2018 at 02:41 AM

    Hi,

    I am having an issue which is related to the language change. My users have an option to select the language on the Launchpad logon page. For example he selects German, the application tiles load in German language. But there are certain applications within the launhcpad, which need to load in English, no matter what the user has selected. Is there a way we could restrict or bypass the language parameter only for certain applications of the launchpad?

    I was thinking if I could probably get the current language parameter once the user opens the application and save it in some model.

    sap.ui.getCore().getConfiguration().getLanguage();

    Then change the same to the desired language ---> sap.ui.getCore().getConfiguration().setLanguage("EN");

    Finally when the user would exit the application, I'd set it back to the original language. Would that work? Is it a good approach?

    Please advise.

    Thanks & regards

    Stephanie

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07 at 10:48 AM

    Hi Rakesh,

    There are some standard texts in the application as well, like the Calendar legends that would display in the language selected on the Fiori launchpad. We would not be able to change/hard-code texts for such controls. Yes, for the other input controls, I could hard code, but not for the standard texts. :(

    Regards

    Stephanie

    Add comment
    10|10000 characters needed characters exceeded