Class wwLocaleInfo

The LocaleInfo class provides information about a particular Locale and lets you Set the Locale information for the current Visual FoxPro Session.

Class Members

MemberDescription

GetLocaleInfo

Loads local properties with Locale specific info for a given Locale ID. Locale Ids are either numeric values (0x0409 for US for example) or string values (en-US, de-AT etc). You can use LocaleLookup to get a LocaleId from an string based LocaleID.

o.GetLocaleInfo(lvLocale)

GetLocalesFromSystem

Returns a collection of all the Locales on the system. The collection returns both the string and numeric Locale Ids.

o.GetLocalesFromSystem()

LocaleLookup

Returns the numeric LocaleId from a string Locale Id (en-US)

o.LocaleLookup(lcLocaleId)

LocaleLookupTable

Returns a cursor __Locales that contains a fixed set of Locales from a default Win2003 Server installation.

o.LocaleLookupTable()

SetLocaleInfo

Sets the FoxPro Locale settings based on a Locale.

o.SetLocaleInfo(lnLocale,lcCurrencySymbol)

cCountry

The name of the Country in the native language.

cCurrencyLocation

Determines where the Currency Symbol goes.

cCurrencySymbol

The Currency Symbol for the Locale.

cDateFormat

The DateFormat (DMY, MDY etc).

cDateSeparator

The Date Separation Character.

cDecimalPoint

Decimal point character.

cEnglishCountry

Name of the country in English.

cLocaleName

Official name of the Locale including sub-locale.

cThousandsSeparator

Separator for numbers in the thousands.

cTimeSeparator

Time Separator

l24HourTime

Determines whether the clock is 12 or 24 hours

nLocaleId

Numeric LocaleId.

nLocaleId

String LocaleId (en-US)

Example

DO WCONNECT
o = CREATEOBJECT("wwlocaleInfo")
lcLang = "de-de"
LOCAL loLocale as Locale
o.GetLocaleInfo(lcLang)

loLocale = o
? loLocale.cLocaleId
? loLocale.nLocaleId
? loLocale.cCountry
? loLocale.cEnglishCountry
? loLocale.cDateSeparator
? loLocale.cDateFormat
? loLocale.cCURRENCYSYMBOL
? loLocale.cCurrencyLocation
? loLocale.CDECIMALPOINT
? loLocale.ctHOUSANDSSEPARATOR

? o.SetLocaleInfo(lcLang)
? DATETIME()
? DATE()
? 100101.121
? TRANSFORM(10000,"@$")

Requirements

Assembly: wwLocaleInfo.prg

© West Wind Technologies, 1996-2024 • Updated: 01/09/16
Comment or report problem with topic