想要禁用字体大小和多种语言 [英] Want to Disable Font Size and Multiple Languages

查看:100
本文介绍了想要禁用字体大小和多种语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft Visual Studio,并编写了可以在许多国家/地区使用的功能强大的仿真工具.但是,我想禁用两个不需要的窗口功能"(Features).破坏了我的程序.首先是Windows文字 可以在控制面板中将尺寸设置为较小(100%),中(125%)或较大(150%).我想将程序中使用的文本大小强​​制为较小的文本大小,因为它会破坏我的GUI的文本大小.第二, 一些语言使用逗号,"而不是句点.".这会破坏数学计算.有没有一种方法可以强制我的程序始终执行用英语运行?

I'm using Microsoft Visual Studio and have written a powerful simulation tool that can be used in many countries.  However, I want to disable two undesired windows "Features" that are breaking my program.  The first is the windows text size that can be set in the control pannel to Smaller (100%), Medium (125%), or Larger (150%).   I want to force the text size used in my program to be the Smaller text size as it wrecks my GUI to have larger text sizes.    Secondly, some languages use the comma "," instead of the period ".".  This wrecks mathematical calculations.  Is there a way to force my program to always  run in English?  

推荐答案

我正在使用Microsoft Visual Studio,并编写了可以在许多国家/地区使用的功能强大的仿真工具.但是,我想禁用两个不需要的窗口功能"窗口.破坏了我的程序.首先是Windows文字 可以在控制面板中将尺寸设置为较小(100%),中(125%)或较大(150%).我想将程序中使用的文本大小强​​制为较小的文本大小,因为它会破坏我的GUI的文本大小.第二, 一些语言使用逗号,"而不是句点.".这会破坏数学计算.有没有一种方法可以强制我的程序始终执行用英语运行?

I'm using Microsoft Visual Studio and have written a powerful simulation tool that can be used in many countries.  However, I want to disable two undesired windows "Features" that are breaking my program.  The first is the windows text size that can be set in the control pannel to Smaller (100%), Medium (125%), or Larger (150%).   I want to force the text size used in my program to be the Smaller text size as it wrecks my GUI to have larger text sizes.    Secondly, some languages use the comma "," instead of the period ".".  This wrecks mathematical calculations.  Is there a way to force my program to always  run in English?  

那些在系统上没有英语包的人会怎么做?还是不说英语?

Well what would people that don't have English language packs on their system do? Or that don't speak English do?

也许您应该确定,如果您想出售功能强大的仿真工具,则其系统要求仅包括美国英语,并且仅包含100%的文本大小和100%的屏幕分辨率.这是愚蠢的,会让人 不知道由于约束而写得好吗. Plus窥视系统具有多显示器系统,并且可能希望在一台显示器上以与另一台显示器不同的方式运行某些程序,等等.

Maybe you should make certain that if you want to sell your powerful simulation tool that its system requirements include U.S. English only and only text size of 100% and only screen resolution of 100%. Which is rather foolish and would make people wonder how well it is written due to the constraints. Plus peeps have multimonitor systems and may want to run some program on one monitor set differently than the other monitor, etc, etc.

实际上,如果您的应用程序是全球化编写的,那么全球化就可以在我相当确定的系统上对当前的文化进行数学计算.

Actually if your application is written globalized then globalization works mathematically for the current culture on a system I'm fairly certain.

关于禁止用户使用控制面板功能进行显示是非常独特的,因为我从未听说过任何需要这样做的程序.通常由程序员提供其程序所需的功能来支持 这样的东西.

And with regard to disallowing a user to use control panel features for the display is rather unique as I've never heard of any program that requires that. It's typically up to the programmer to provide the features necessary with their program to support such things.

您不会提及您的应用程序是在哪个Visual Studio模板中创建的.如果它是Windows.Forms应用程序,请研究有关DPI感知和 自动缩放.

You don't mention what Visual Studio Template your app was created in. If it is a Windows.Forms app then research about DPI aware and Automatic Scaling.

关于数学,我没有其他文化的数学经验,但是您可以在应用程序中设置全球化,因此无论系统上使用哪种语言包,它都可以作为一种不同的文化来测试数学.同样,您不提供 您使用的语言.

With regard to Math I don't have experience with other cultures math but you can set globalization in your app so it works as a different culture for testing math regardless of the language pack being used on your system. And again you don't provide the language you use.

无论如何,这是一个VB.Net线程,我在其中设置应用程序线程的区域性

Anyhow here's a VB.Net thread where I set the apps threads culture Using operants like + * - / from a DGV Cell to German (de-DE) which uses period for thousands separator in strings and comma as decimal separator in strings and numeric variables that allow decimal places such as double, decimal and single although I didn't test with all those.

您可以在此处看到不同文化的变化形式,此处使用命令和句点来表示小数点分隔符,并使用逗号,句点和单引号来表示千位分隔符 十进制标记.

You can see a variation of different cultures uses of command and period for decimal separator and comma, period and single quote for thousands separator here Decimal mark.

您还可以使用

And you can get all the letter designators for other cultures using CultureInfo Class and I suppose you would want the CultureInfo.LCID Property.

我不知道此链接的最新信息 语言标识符常量和字符串,但是您会看到一种小写的主要语言,例如de表示德语,德语则表示次语言,例如DE表示德国.因此,在VB.Net线程处的示例代码中,它使用"de-DE"来表示.对于德国-德国 和"zh-CN"适用于英语和美国,其中"en-GB"将是英语和英国.因此,基本上,您可以制作自己的应用,它不会改变其语言,但是我相信数学会相应地改变所使用的文化.

I don't know how up to date this link Language Identifier Constants and Strings but you'll see a primary language in lower case such as de for German and sublanguage in upper case such as DE for Germany. So in the example code at the VB.Net thread it uses "de-DE" for German-Germany and "en-US" would be for english and US where "en-GB" would be english and United Kingdom. So basically you can make your app, it won't alter its language, but the math I believe will alter accordingly for the culture used.

但是我想使用不正确的十进制分隔符来包含包含论坛的硬编码变量可能是一个问题.再说一次,如果这是一个问题,我想任何带有硬编码变量的东西都可以放在库类中,以便所有 库类完全相同,只是变量值是特定于区域性的.然后,用户在安装时选择要使用的语言,以便安装程序在安装程序后为该类添加正确的.Dll.

But I suppose hardcoded variables containing forumulas using incorrect decimal separators for values may be an issue. Then again if that is an issue I suppose anything with hard coded variables could be placed in Library Classes such that there all Library classes are the exact same except the variables values are culture specific. And then the user select on install the language to use so the installer adds the correct .Dll for the class with the install of the program.

另请参见 全球化开发中心.

Also see Globalization Dev Center.

世界上只有大约25%的人了解英语,我不知道其中有多少人会识字.那么,为什么将您的应用程序限制为一种语言.并且某些会讲英语的文化可能不会使用句点作为小数点分隔符 我所知道的.

Plus only about 25% of the worlds population has an understanding of English how much of that is literate English I've no idea. So why limit your app to one language. And some cultures that speak English may not use the period as the decimal separator for all I know.


这篇关于想要禁用字体大小和多种语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆