Absent Member.
Absent Member.
748 views

localization in Visual COBOL

Jump to solution

[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.




0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert
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.

View solution in original post

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert
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.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.