Skip to Content
author's profile photo Former Member
Former Member

Options to pass language to UI5 Applications

All:

We use NON-SAP Portal as an entry point/employee facing portal where all applicaitions(SAP & NON-SAP) presented to the employee as a tiles. We have provisoned an employee with an option to chose their choice of language during the runtime at the Portal Level. For example, As an employee, I have the ability to switch between languages between EN & FR and vice veras and we don't want to update language selection of the employee to business suite systems.

Based on the language selction of the employee on the portal, We need to load & translate the applicaitons in the selected language. What are the mulitple options avaiable for this case to pass the language parameter to UI5 applcations.

1. Can Language be set in the Cookie Like MYSAPSSO2 and SAP-UserContenct?

I have tried this option where SAP-UserContext is set with Lanaguage and Client. However, UI5 applicaiton consuming these cookies weren't able to pick up the language from the cookie instead Language is picked up from browser.

2. Passing the language as URL parameter like sap-language=FR / EN. What are the downsides to this option to use in Production. I prefer to avoid passing the value as URL parameter to avoid visibility to end users on the language selection and potential overwrite.

What are your thoughts on this options.

3. Consider Browser language as the default language. This option doesn't work since we do share systems to access enterprise applications and chaging the browser language effects other employees who may/may not know how to change back the language to Default per region and in turn increage support calls.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 12, 2016 at 04:40 PM

    SAPUI5 SDK - Demo Kit

    language

    Type: string

    Default value: user language

    URL: Yes

    Modifiable at runtime: No

    This configuration parameter defines the language that shall be used for localized texts, formatting, and so on.

    The default value is not static, but determined from the browser or user language in the following order:

    1. navigator.language
    2. navigator.browserLanguage
    3. navigator.userLanguage

    SAPUI5 SDK - Demo Kit

    The URL parameter name is composed of the name of the configuration option and the

    sap-ui- prefix.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 12, 2016 at 08:34 PM

    You can define the language in the global config object before bootstrapping SAPUI5.

    window["sap-ui-config"] = {
      language : "FR",
      };
    

    Using the Global Configuration Object for Configuration - User Interface Add-On for SAP NetWeaver - SAP Library

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.