cancel
Showing results for 
Search instead for 
Did you mean: 

current user language

ucf
Champ on-the-rise
Champ on-the-rise
hello everybody,

I want to get the current alfresco user in order to know what message to send(english or french) can you anyone help?

regards,
7 REPLIES 7

kaynezhang
World-Class Innovator
World-Class Innovator
Use

org.alfresco.repo.i18n.MessageService.getLocale() method
or
org.springframework.extensions.surf.util.I18NUtil.getLocale() mehtod

ucf
Champ on-the-rise
Champ on-the-rise
thank you for your help but there's a problem that is however I logg in (french or english) I get the language fr

kaynezhang
World-Class Innovator
World-Class Innovator
Which client are you using ,share or explorer?
Share locale is automatically chosen according to the  language settings of browser.
Explorer use the locale you choose from login page.
After that The current locale is setted into current thread. If no Locale is  specified the repository will use the default Locale.

So I guess your default locale is fr ,and you haven't change your locale to english correctly.

ucf
Champ on-the-rise
Champ on-the-rise
thanks but I did change the language from firefox preferences, and I logged into repository in english, but it doesn't work it seems like using default locale no matter what 😕
ps: I'm using both share and repository and set both in english(just in case)

kaynezhang
World-Class Innovator
World-Class Innovator
Have you tested whether it works when you select english language in explorer login page instead of changing language in firefox

ucf
Champ on-the-rise
Champ on-the-rise
I did, in fact (by repository I meant explorer), I chose english but didn't work the probleme is that the default locale is not changed by logging nor changing firefox preferences