cancel
Showing results for 
Search instead for 
Did you mean: 

Change language during running of application

Former Member
0 Kudos

Hello,

i need to make some application which enables users to change language of gui by clicking a button. I have one idea - in context is one attribute with language nad all texts, labels and so on have their own attribute in context. This attribute is calculated and returns the text in specified language-this text is then bind to UI elemets.

But i hink that there has to be another way-how can i tell that user is using specific language?

thanks

JJ

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jiri,

You don't have to implement the translation process by yourself.

Here is the WD tutorial for internationalization of WD applications.

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/35f1e990-0201-0010-7a86-914036942779

After implementing this:

If you want to change the language of an application running throw a portal use the change language option in the personalize link in the masthead.

If you want to change the language of an application not running throw a portal see the next thread:

In this solution when a user wants to change the language of the application.

We log out with a redirect URL to the same application with a new local (attached as a parameter to the URL). This solution will only work if you are not running throw a portal.

Hope this helps, Adi

Former Member
0 Kudos

Thanks....but i need solution which will be running also in portal. And customer dont want to change language in personalization, he needs to change language only of this application...

JJ

Answers (3)

Answers (3)

Former Member
0 Kudos

Congrats

why dont u give us the solution..

Regards

AM

Former Member
0 Kudos

as i wrote in my first message of this thread....using calculated context attribut for each label....

JJ

luciano_leitedasilva
Contributor
0 Kudos

Hi Jiri,

Try use this code when a event to change the language is launched:

IUserFactory userFactory = UMFactory.getUserFactory();

IWDClientUser user = WDClientUser.getCurrentUser();

String language = "es"; // I will try set my application's language as Spanish

IUserMaint user = userFactory.getMutableUser(user.getSAPUser().getUniqueID());

user.setLocale(new Locale(language ,"",""));

user.save();

user.commit();

Regards,

Luciano

Former Member
0 Kudos

do you need a webdynpro application in different languages even as ur toplevel navigation and all other navigation remain same??

Former Member
0 Kudos

exactly...

i finished with my proposed solution , but thanks for all answers...

JJ