From: David ‘Bombe’ Roden Date: Wed, 29 Jun 2011 07:11:53 +0000 (+0200) Subject: Try to use the L10n’s locale. X-Git-Tag: 0.6.6^2~48 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=26442ab022bee0839df3efd2ad11e893903f9471;p=Sone.git Try to use the L10n’s locale. --- 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()); } }