From 26442ab022bee0839df3efd2ad11e893903f9471 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 29 Jun 2011 09:11:53 +0200 Subject: [PATCH] =?utf8?q?Try=20to=20use=20the=20L10n=E2=80=99s=20locale.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java b/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java index a9d1d72..3c82565 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java +++ b/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java @@ -20,6 +20,7 @@ package net.pterodactylus.sone.freenet; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import java.util.Map; import net.pterodactylus.util.template.Filter; @@ -64,6 +65,6 @@ public class L10nFilter implements Filter { parameterValues.add(value); ++parameterIndex; } - return new MessageFormat(l10n.getString(String.valueOf(data))).format(parameterValues.toArray()); + return new MessageFormat(l10n.getString(String.valueOf(data)), new Locale(l10n.getSelectedLanguage().shortCode)).format(parameterValues.toArray()); } } -- 2.7.4