简体   繁体   English

如何将CultureInfo设置为InvariantCulture Classic ASP(VBScript)

[英]How to Set CultureInfo to InvariantCulture Classic ASP (VBScript)

I am looking for a way to set a Classic ASP page's Culture Info to Invariant Culture so that the decimals have a dot and not a comma. 我正在寻找一种将经典ASP页面的“文化信息”设置为“不变文化”的方法,以使小数点带有点而不是逗号。 This gives me allot of issues, On windows 8 doesn't work, get it to work on windows 8, then it doesn't work on previous versions of windows anymore. 这给了我一些问题,在Windows 8上不起作用,让它在Windows 8上起作用,然后在以前的Windows版本上不再起作用。

In C# the whole thread's Culture can be set once and forget about it, 在C#中,整个线程的区域性可以设置一次,而不必理会,

Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture

How can I achieve something like this with Classic ASP? 如何使用Classic ASP实现类似目的? I tried setting the LCID on top of each page as well as in the session 我尝试将LCID设置在每个页面以及会话中

<%@ LANGUAGE="VBScript" LCID=7177%>

Session: 会议:

Session.LCID=7177

But this does not work 但这不起作用

EDIT: 编辑:

In <%@ LANGUAGE="VBScript" LCID=7177%> I Changed LCID=7177 to LCID="127" <%@ LANGUAGE="VBScript" LCID=7177%>我将LCID=7177更改为LCID="127"

I have set Session.LCID=127 我已经设置了Session.LCID=127

In IIS under ASP tab, I set Locale ID to 127 在IIS的ASP选项卡下,我将Locale ID为127。

and in the Web.Config, I set globalization 然后在Web.Config中设置全球化

<configuration>
    <system.web>
        <globalization culture="" uiCulture="" />
    </system.web>
</configuration>

I am not sure, which of these made the difference, But It works now and the Decimal values have a dot in them and not a comma 我不确定其中哪一个有所作为,但现在可以使用,并且十进制值中有一个点而不是逗号

Based on this article (I know it's but should translate just fine for the LCID , could you not use; 根据本文 (我知道它是但应该对LCID翻译就可以了,您不能使用吗?

'Invariant Culture
Session.LCID = 127

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM