From: Roland Häder Date: Tue, 24 May 2016 08:56:49 +0000 (+0200) Subject: get locale from user (closes part 1 of TODO) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ba293c13def3c392b25eef752327558f9e1ffdf2;p=pizzaservice-core.git get locale from user (closes part 1 of TODO) --- 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);