您好,现在无法通过设置线程culture 自动切换语言,只能强制设置了
修改下Spread.Ribbon InitializeLocalUI 的逻辑,强制从资源里获取中文
private void InitializeLocalUI()
{
if (System.Threading.Thread.CurrentThread.CurrentUICulture.Name == "en-US")
return;
if (FarPoint.Win.Spread.Design.common.rm != null)
{
rm = FarPoint.Win.Spread.Design.common.rm;
}
else
{
FarPoint.Win.Spread.Design.common.LoadResourceManagerForStrings();
rm = FarPoint.Win.Spread.Design.common.rm;
}
FarPoint.Localization.LocalizationResourceManager manager = null;
manager = new FarPoint.Localization.LocalizationResourceManager("SpreadWinDesigner", System.Reflection.Assembly.GetAssembly(typeof(SpreadRibbon)));
var sdf = manager.GetString("rbPaste.Text");
rm = manager.GetResourceSet(new System.Globalization.CultureInfo("zh-CN"), false, false);
|