From a298b7968060ecbf4e819dca984d0be32b69c62f Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 12 Apr 2024 22:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BF=BB=E8=AF=91=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E5=BE=AA=E7=8E=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.xaml.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 82cc3ac..81df605 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -16,6 +16,7 @@ using System.Threading.Tasks; using System.Timers; using System.Windows; using System.Windows.Controls; +using System.Windows.Input; using System.Windows.Interop; using VPet_Simulator.Core; using VPet_Simulator.Windows.Interface; @@ -58,7 +59,14 @@ namespace VPet_Simulator.Windows LocalizeCore.StoreTranslation = true; - LocalizeCore.TranslateFunc = (str) => Sub.TextDeReplace(str).Translate(); + LocalizeCore.TranslateFunc = (str) => + { + var destr = Sub.TextDeReplace(str); + if(destr == str) + return str; + return destr.Translate(); + }; + CultureInfo.CurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name); CultureInfo.CurrentCulture.NumberFormat = new CultureInfo("en-US").NumberFormat;