Skip to main content

[Migrated content. Thread originally posted on 22 November 2011]

Hello,

I want to use CultureInfo in a managed project. I set these lines:

$set ilusing "System.Threading"
$set ilusing "System.Globalization"


I do not know how to translate this code (original in C#):

Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

I find it a 'bit' tricky.... I got an instantation error in the last line.

01 thread    type System.Threading.Thread.
01 cuture    type System.Globalization.CultureInfo.

set culture to new System.Globalization.CultureInfo(idioma).
set thread::CurrentCulture to culture.




[Migrated content. Thread originally posted on 22 November 2011]

Hello,

I want to use CultureInfo in a managed project. I set these lines:

$set ilusing "System.Threading"
$set ilusing "System.Globalization"


I do not know how to translate this code (original in C#):

Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

I find it a 'bit' tricky.... I got an instantation error in the last line.

01 thread    type System.Threading.Thread.
01 cuture    type System.Globalization.CultureInfo.

set culture to new System.Globalization.CultureInfo(idioma).
set thread::CurrentCulture to culture.




In Visual COBOL you can do this as follows:

set type Thread::CurrentThread::CurrentCulture to new type CultureInfo("fr-FR")

You don't need the data items as these are static class methods.