<< Click to Display Table of Contents >> Example |
!== TCultureInfo & TRegionInfo example
culture TCultureInfo
region TRegionInfo
CultureInfoG GROUP,PRE(CultureInfoG)
Name STRING(20)
EnglishName STRING(64)
NativeName STRING(64)
TwoLetterISOLanguageName STRING(2)
ThreeLetterISOLanguageName STRING(3)
IsNeutral BYTE
CurrencyEnglishName STRING(32)
CurrencyNativeName STRING(32)
IsMetric BYTE
END
CODE
culture.CurrentCulture()
CultureInfoG:Name = culture.Name()
CultureInfoG:EnglishName = culture.EnglishName()
CultureInfoG:NativeName = culture.NativeName()
CultureInfoG:TwoLetterISOLanguageName = culture.TwoLetterISOLanguageName()
CultureInfoG:ThreeLetterISOLanguageName = culture.ThreeLetterISOLanguageName()
CultureInfoG:IsNeutral = culture.IsNeutralCulture()
IF NOT culture.IsNeutralCulture() AND NOT culture.IsInvariantCulture()
region.FromCulture(culture)
CultureInfoG:CurrencyEnglishName = region.CurrencyEnglishName()
CultureInfoG:CurrencyNativeName = region.CurrencyNativeName()
CultureInfoG:IsMetric = region.IsMetric()
ELSE
CultureInfoG:CurrencyEnglishName = '<Not available>'
CultureInfoG:CurrencyNativeName = '<Not available>'
CultureInfoG:IsMetric = 2 !indeterminate
END