cancel
Showing results for 
Search instead for 
Did you mean: 

How to change an application's locale

Former Member
0 Kudos

Hello,

I've created a DynPro application and set the Project language to: Hebrew.

Even though when I write this line:

wdComponentAPI.getMessageManager().reportSuccess(WDResourceHandler.getCurrentSessionLocale().toString());

I receive: "en_GB" which means English of course.

I assume this is the cause of many of my language problems at the Project.

At first I thought it is a browser issue so I changed it's main language to Hebrew but it didn't help.

Is there any way to change this using DynPro configuration/code?

Roy

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi Roy,

The first method sets it in the URL .. which has the top priority.. That shud do.. Maybe as a fallback u can specify language in application properties..(it is the default locale...)

Regards

Bharathwaj

Former Member
0 Kudos

Hi Roy,

Their is a particular priority it gives for the language specified ..The current session locale is picked from the one which is present and has the highest priority

Its in this order..

1.URL

2.User ID

3.Browser

4.Default Locale Property

5.WD system

6.VM Default

7.Final locale

regards

Bharathwaj

Former Member
0 Kudos

OK... So can I change each one?

Former Member
0 Kudos

It is because the language you have specified in the .xlf file of your application

go to package explorer and

project name->bin->package name->wdp->*.xlf

there check the source language

Former Member
0 Kudos

Hey Noufal,

I've checked all the xlf's and they are all on Hebrew mode, so how can it be that I still receive en_BG ?

Former Member
0 Kudos

Just try restarting the NDS. I too had similar problems and it worked fine after a restart.

Former Member
0 Kudos

But why restarting, I didn't made any change, it was on Hebrew at first place. Anyway, I tried it, still the same...

Former Member
0 Kudos

hello Roy

the problem is not with ur application language rather its the browser languge thats being shown.

you change ur browser language to Hebrew and check it out.

to change browser language:

Tools -> InternetOptions -> languages.

in that add "hebrew" and move it to the top.

close the browser window and run the application again.

this might help u.

regards,

Piyush.

Former Member
0 Kudos

Hey piyush,

10X for the advice but as I ststed at the begining of the post I've already tried that and it doesn't help.

Former Member
0 Kudos

Roy,

Given the fact that this is for test reasons only, please do the following:

1. Add sap-locale=<hebrew-locale-code> to URL of invoking aplication

2. Add sap-locale, <hebrew-locale-code> to marameters map of application to be invoked.

I'm not sure, but [2] probably unnecessary, while both applications will be part of the same user session.

For other readers: origins of discussion are here

VS

Former Member
0 Kudos

Hey Valery,

But how do I do it technically?

Former Member
0 Kudos

I do not understand your question.

For [1] you just type parameter in browser address bar, for [2] you hardcode it for parameters map in your code.

Or you mean smth. different?

VS

Former Member
0 Kudos

Hey,

I tried to pass it as a parameter but it didn't help. Sorry to disappoint you...