cancel
Showing results for 
Search instead for 
Did you mean: 

CAF language

08-03-2006 3:09 PM
517 views 3 comments
0 Likes
SAP Managed Tags
Subscribe

Hi people,

Inside my CAF Core Project i have created entities and defined some fields as language dependent. I am using this CAF project as DC for other webdynpro component.

Now I test my WD application. How can I realize during the runtime, which language is actualy the current one for the CAF component? I want to print out this information for example as a Caption on the screen to be able identify missing language dependent entries and create them within CAF framework later on?

Thanks in advance

Kamil

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Kamil,

In our project we retrieve the locale the following way:

<i>userName = sessionContext.getCallerPrincipal().getName();

IUser user = UMFactory.getUserFactory().getUserByUniqueName(userName);

Locale currLocale = user.getLocale();</i>

The <i>userName</i> is automatically retrieved by the generated code at the beginning of every method, so actually you can use the <i>CAF_user</i> generated variable.

Regards,

Robert

0 Likes

Hi Robert,

thats it thank you!

Regards

Kamil

Former Member
0 Likes

The language comes from the UserFactory. It's the language for the user defined in UME you log in the Portal with.