From ba293c13def3c392b25eef752327558f9e1ffdf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 May 2016 10:56:49 +0200 Subject: [PATCH] get locale from user (closes part 1 of TODO) --- .../pizzaaplication/database/BasePizzaDatabaseBean.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/org/mxchange/pizzaaplication/database/BasePizzaDatabaseBean.java b/src/org/mxchange/pizzaaplication/database/BasePizzaDatabaseBean.java index cd1e7ab..3e8a5e1 100644 --- a/src/org/mxchange/pizzaaplication/database/BasePizzaDatabaseBean.java +++ b/src/org/mxchange/pizzaaplication/database/BasePizzaDatabaseBean.java @@ -18,7 +18,6 @@ package org.mxchange.pizzaaplication.database; import java.text.MessageFormat; import java.util.GregorianCalendar; -import java.util.Locale; import java.util.Objects; import java.util.Properties; import javax.ejb.EJBException; @@ -494,9 +493,9 @@ public abstract class BasePizzaDatabaseBean extends BaseDatabaseBean { variables.put("baseUrl", baseUrl); //NOI18N // Set all - // @TODO Get locale from user + language from message bundle + // @TODO Language from message bundle emailWrapper.setRecipient(emailAddress); - emailWrapper.setLocale(Locale.GERMAN); + emailWrapper.setLocale(user.getUserLocale()); emailWrapper.setSubjectLine(subjectLine); emailWrapper.setTemplateName(templateName); //NOI18N emailWrapper.setTemplateVariables(variables); -- 2.39.5