cancel
Showing results for 
Search instead for 
Did you mean: 

Translate mail message when add user direct to a site

webdevptg
Confirmed Champ
Confirmed Champ

How to translate a mail message into Portuguese pt_PT when a site manager adds a user directly

6 REPLIES 6

cesarista
World-Class Innovator
World-Class Innovator

Hi:

Try adding -Duser.language=pt -Duser.region=pt variables in JAVA_OPTS (usually in $ALF_HOME/tomcat/bin/setenv.sh) and restart Alfresco. If this is your setting, add a portuguese template in Data Dictionary/Email Templates/invite 

Regards.

--C. 

afaust
Legendary Innovator
Legendary Innovator

One thing you have to keep in mind is that Alfresco will typically be using the locale of the current user when generating the email. So if the current user is using English or Spanish, the system locale set via -D will not be used. Only when absolutely NO locale can be determined for the current user (no Accept-Language HTTP header set) then the locale set via -D will be used as the fallback.

Other than that Cesar Capillas is right that you would need to add an email template because there is no Brazillian Portugese template for that particular email. If you look inside your Data Dictionary folder in Alfresco you should find a invite-email-add-direct.html.ftl somewhere in the Email Templates sub-folder along with some localized variants of it. To add one for Brazilian Portugese just copy the file with a _pt_BR fragment between html and .ftl, and then translate the text in that file.

cesarista
World-Class Innovator
World-Class Innovator

Hi Axel:

Interesting. I understand that you refer to the user who is inviting (due your reference to the HTTP header sets), cause locale setting is not a user preference. I always thought that only default language applied in notifications. So what is happening with activities notification for example ? What is the language used for each user ? 

Regards.

--C.

afaust
Legendary Innovator
Legendary Innovator

As a system process that job uses the system locale set via -D (or derived from the operating system context).

cesarista
World-Class Innovator
World-Class Innovator

Thanks for the confirmation Axel,

Best regards.

--C.

douglascrp
World-Class Innovator
World-Class Innovator

There is a project with the templates already translated into Brazilian Portuguese here GitHub - ambientelivre/Alfresco-DataDictionary-pt_BR: Templates e Artefatos do Alfresco traduzidos p...