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");
精彩评论