开发者

What is C# sample code for VBScript SetLocale Function

I have got below code in VBScript.

Sub SetPageLocale()
    Dim Locale
    Dim ContextObject
    Set ContextObject=getContextObject
    Locale=getFieldValue(ContextObject.Publication.MetadataFields("Configuration").Value(1).Fields("Locale"),"")
    If Locale<>"" Then
        SetLocale(Locale)
    Else
        SetLocale("en-gb")' Move to Constants TBB
    End If

    Set ContextObject = Nothing
End Sub

Now I want to convert above code in C#. Especially I am looking for C# code for VbScript SetLocale f开发者_StackOverflowunction


In .NET you could the CultureInfo class to set the locale of the current thread:

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜