cancel
Showing results for 
Search instead for 
Did you mean: 

Notification emails using wrong language

catar4
Champ in-the-making
Champ in-the-making
Hi,

We have recently setup configuration so that our Alfresco Share (4.2) installation could send notification emails.

Many of the users on this installation speak french, have both their system's OS and web browser's language set to french but even then notification emails which are sent for notifications on Workflow changes still are in english.

I see the email templates whch all have a french version alongside the english (default) version, like:

tomcat/webapps/alfresco/WEB-INF/classes/alfresco/bootstrap/notification/wf-email.html_fr.ftl

For everything but workflow notification emails (and maybe notification emails in other modules, wouldn't know yet ?) Alfresco is using french for these users, so I'm really wondering what's happening right now.

There are no errors in the log that would explain this, no customization either. I'm really at a loss as to why this is happening.

Would anyone have pointers on this, things I could validate, etc ?

thanks in advance,
Carl
9 REPLIES 9

catar4
Champ in-the-making
Champ in-the-making
This did help me better understand how the localization is done in Alfresco Share. That said, it didn't solve my issue.

I did install the french language support on the server, it wasn't installed before:

sudo locale-gen fr_CA.UTF-8

followed by:

sudo dpkg-reconfigure locales

When I execute "locale" it shows me everything configured to use fr_CA.UTF-8

The I reboot the machine, start the alfresco services and connect to the system. Then, in a french browser, I start a workflow and assign it to my test user, who then receives an email generated from the english template (it's all in english).

Anything more that I could check ?

PS: Still flagged your answer as useful … it was a step in the right direction.

sanket
Champ on-the-rise
Champ on-the-rise
I tried a lot but only the email subject is shown in french.
The entire email body still remains in english.

I think this is a logged issue with alfresco.
https://issues.alfresco.com/jira/browse/MNT-10989

catar4
Champ in-the-making
Champ in-the-making
I'm having the same behavior on my two servers (dev and production).

I have found something in the Alfresco context's system information menu (localhost:8080/alfresco/faces/…/ go to the Administration Console then to System Information) and look at the informations for HTTP Session State and System Properties.

When I look at HTTP Session State it says locale=en_US with USE_SESSION_LOCALE=true … even though I have reconfigured my locale on the Unix server so that fr_CA.UTF-8 would be the only configured locale to be used.

Then looking at the System Properties I see that, apprently reconfiguring my locales worked since I see that user.country=CA, user.language=fr and user.region=CA … so apparently either setting the JAVA_OPTS or reconfiguring the whole system's locales did part of the job correctly.

So I end up wondering how my session can be set to en_US (my browser is fr_CA all the way and the system I use for the tests only knows fr_CA …). I'm pretty puzzled and will keep looking, let you know if I find anything.

For now I'll go check the jira issue, thanks again Sanket.

EDIT: I checked the translation, everything looks OK. The email templates' french versions are all in french too.

sanket
Champ on-the-rise
Champ on-the-rise
It works for me now. I receive workflow notification emails in french (subject as well as template).
Today morning, I just changed the browser language to french (mozilla firefox). Then refreshed alfresco page (http://localhost:8080/alfresco); and checked the
HTTP Session state information. It is showing fr_FR now.
The total settings that I made are just :
1) Change browser (firefox) language to french.
2) Append this locale entry (-Duser.country=FR -Duser.region=FR -Duser.language=fr) in JAVA_OPTS property in catalina.bat file (as I am using windows 7).

What I recommend is,
Make the above locale entry in catalina.bat (if you are using Windows), and in catalina.sh (if you are using Linux).
keep your browser language set to French. Restart the browser and access alfresco and then start worflow to send email notification.

catar4
Champ in-the-making
Champ in-the-making
I'll check it out and come back here to keep you informed of the success (or lack thereof) of those steps, when I've got the time to test it. What worries me is that this installation was migrated from another server (configured in english) and Alfresco 3.4.d. Something might have remained "stuck in english".

Anyhow, I'll test the same as you did.

Thanks again !

EDIT: It looks like it's not gonna be as simple as that on this particular setup. Your test results say it is supposed to be simple, but it's not working on my installations (we got both dev and production servers which have the same behaviors).

What'S weird is the email's title is in french, the content is in english. I even translated the english email template in french (even if I don't see this as a viable solution, it was for tests purposes) and even after the translation the email's "body" is still in english.

I'm puzzled and investigating further …

kaynezhang
World-Class Innovator
World-Class Innovator
You can try to use template saved at Company Home/Data Dictionary/Email template in repository instead of using the classpath one,it will deal with local.

catar4
Champ in-the-making
Champ in-the-making
Thanks for the reply kaynezhang,

I did try translating the emails templates which are found in the repository (Company Home/Data Dictionary/Email template/…/). After a wider "grep" that I had tried so far, I found "You have been assigned the following task" in the alf_data/contentstore. I thought, at this point I can try translating this … and bingo ! Translating the "alf_data/contentstore/2012/12/12/11/27/49223063-d7fe-4e35-b447-e4912d12c62d.bin" file worked. Only french will work, but that's better than only english for my users. I'd like localization to work like expected, though.

I don't like that the solution (hopefully this is temporary) is to translate .bin files directly from the contentstore repository and I'm pretty sure from everything I read on these forums and elsewhere that this isn't supposed to work this way … so I'm wondering if this is a bug, known behavior or if I just did it very wrong (which I doubt Smiley Happy )???

Thanks for the informations so far.

kaynezhang
World-Class Innovator
World-Class Innovator
I'am sorry I 'm not clear what you mean, You  create new email templates in Company Home > Data Dictionary > Email Templates and make sure it's name is following i18n  key naming convention.
And in E-mail sending action,use the default local template path as template  path to be used in e-mail,it will use client user's local template.