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 function