Jump to content

UniQueryLocaleItem: Difference between revisions

From EDM2
m completed linkage for LOCI_ constants
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== UniQueryLocaleItem ==
Get the locale information.
; UniQueryLocaleItem(localeObj, queryItem, result) : Get the locale information.
 
=== Syntax ===
UniQueryLocaleItem(localeObj, queryItem, result);


=== Parameters ===
=== Parameters ===
; localeObj - [[OS2 API:DataType:LocaleObject|LocaleObject]] - input : The locale object created from [[OS2_API:UniCreateLocaleObject|UniCreateLocaleObject]].
;localeObj - [[LocaleObject]] - input : The locale object created from [[UniCreateLocaleObject]].
; queryItem - [[OS2 API:DataType:LocaleItem|LocaleItem]] - input : The item to be queried.
;queryItem - [[LocaleItem]] - input : The item to be queried.
; result - [[OS2 API:DataType:UniChar|UniChar]] - output : The locale information received.
;result - [[UniChar]] - output : The locale information received.
 
=== Constants ===
None


=== Returns ===
=== Returns ===
An integer with values of:
An integer with values of:
* [[OS2 API:Unicode:error#ULS_INVALID|ULS_INVALID]]
*[[Unicode Errors|ULS_INVALID]]
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
*[[Unicode Errors|ULS_SUCCESS]]
 
=== Module ===
 
=== Define (C/C++) ===


=== Export name/Ordinal ===
=== Calling Convention===
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:LocaleObject|LocaleObject]] localeObj;
  LocaleObject localeObj;
  [[OS2 API:DataType:LocaleItem|LocaleItem]]   queryItem;
  LocaleItem  queryItem;
  [[OS2 API:DataType:UniChar|UniChar]]     result;
  UniChar      result;
  integer      rc;
  integer      rc;
  ...
  ...
  rc = UniQueryLocaleObject(localeObj, queryItem, result);
  rc = UniQueryLocaleItem(localeObj, queryItem, result);
  ...
  ...


=== Related Functions ===
=== Related Functions ===
[[OS2 API:UniSetUserLocaleItem|UniSetUserLocaleItem]]
*UniSetUserLocaleItem


=== Notes ===
=== Notes ===
[[OS2 API:UniQueryLocaleItem|UniQueryLocaleItem]] returns a pointer in result to a null-terminated [[OS2 API:DataType:UniChar|UniChar]] string containing information found in the locale object identified by localeObj about the language or cultural item named by the item argument. [[OS2 API:UniQueryLocaleItem|UniQueryLocaleItem]] allocates the memory to hold the [[OS2 API:DataType:UniChar|UniChar]] string and returns a pointer in result. Use [[OS2 API:UniFreeMem|UniFreeMem]] to free the memory associated with result by [[OS2 API:UniQueryLocaleItem|UniQueryLocaleItem]].
'''UniQueryLocaleItem''' returns a pointer in result to a null-terminated [[UniChar]] string containing information found in the locale object identified by localeObj about the language or cultural item named by the item argument. '''UniQueryLocaleItem''' allocates the memory to hold the [[UniChar]] string and returns a pointer in result. Use '''UniFreeMem''' to free the memory associated with result by [[UniQueryLocaleItem]].


The constant names and values for queryItem are contained in ulsitem.h:  
The constant names and values for queryItem are contained in ulsitem.h:  
<table border="1" cellpadding="7">
{|class="wikitable"
<tr>
!Item Name||Item Description
<th>Item Name</th>
|-
<th>Item Description</th>
|LOCI_sDateTime||Date and time format string
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sDateTime|LOCI_sDateTime]]</td>
|LOCI_sShortDate||Short date format
<td>Date and time format string</td>
|-
</tr><tr>
|LOCI_sTimeFormat||Time format string
<td>[[OS2 API:Constant:LOCI#LOCI_sShortDate|LOCI_sShortDate]]</td>
|-
<td>Short date format</td>
|LOCI_s1159||AM string
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sTimeFormat|LOCI_sTimeFormat]]</td>
|LOCI_s2359||PM string
<td>Time format string </td>
|-
</tr><tr>
|LOCI_sAbbrevDayName7||Abbreviation of day 7 (Sun)
<td>[[OS2 API:Constant:LOCI#LOCI_s1159|LOCI_s1159]]</td>
|-
<td>AM string </td>
|LOCI_sAbbrevDayName1||Abbreviation of day 1 (Mon)
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_s2359|LOCI_s2359]]</td>
|LOCI_sAbbrevDayName2||Abbreviation of day 2 (Tue)
<td>PM string</td>
|-
</tr><tr>
|LOCI_sAbbrevDayName3||Abbreviation of day 3 (Wed)
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName7|LOCI_sAbbrevDayName7]]</td>
|-
<td>Abbreviation of day 7 (Sun)</td>
|LOCI_sAbbrevDayName4||Abbreviation of day 4 (Thu)
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName1|LOCI_sAbbrevDayName1]]</td>
|LOCI_sAbbrevDayName5||Abbreviation of day 5 (Fri)
<td>Abbreviation of day 1 (Mon)</td>
|-
</tr><tr>
|LOCI_sAbbrevDayName6||Abbreviation of day 6 (Sat)
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName2|LOCI_sAbbrevDayName2]]</td>
|-
<td>Abbreviation of day 2 (Tue)</td>
|LOCI_sDayName7||Name of day of week 7 (Sun)
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName3|LOCI_sAbbrevDayName3]]</td>
|LOCI_sDayName1||Name of day of week 1 (Mon)
<td>Abbreviation of day 3 (Wed)</td>
|-
</tr><tr>
|LOCI_sDayName2||Name of day of week 2 (Tue)
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName4|LOCI_sAbbrevDayName4]]</td>
|-
<td>Abbreviation of day 4 (Thu)</td>
|LOCI_sDayName3||Name of day of week 3 (Wed)
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName5|LOCI_sAbbrevDayName5]]</td>
|LOCI_sDayName4||Name of day of week 4 (Thu)
<td>Abbreviation of day 5 (Fri)</td>
|-
</tr><tr>
|LOCI_sDayName5||Name of day of week 5 (Fri)
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevDayName6|LOCI_sAbbrevDayName6]]</td>
|-
<td>Abbreviation of day 6 (Sat)</td>
|LOCI_sDayName6||Name of day of week 6 (Sat)
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName7|LOCI_sDayName7]]</td>
|LOCI_sAbbrevMonthName1||Abbreviation of month 1
<td>Name of day of week 7 (Sun)</td>
|-
</tr><tr>
|LOCI_sAbbrevMonthName2||Abbreviation of month 2
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName1|LOCI_sDayName1]]</td>
|-
<td>Name of day of week 1 (Mon)</td>
|LOCI_sAbbrevMonthName3||Abbreviation of month 3
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName2|LOCI_sDayName2]]</td>
|LOCI_sAbbrevMonthName4||Abbreviation of month 4
<td>Name of day of week 2 (Tue)</td>
|-
</tr><tr>
|LOCI_sAbbrevMonthName5||Abbreviation of month 5
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName3|LOCI_sDayName3]]</td>
|-
<td>Name of day of week 3 (Wed)</td>
|LOCI_sAbbrevMonthName6||Abbreviation of month 6
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName4|LOCI_sDayName4]]</td>
|LOCI_sAbbrevMonthName7||Abbreviation of month 7
<td>Name of day of week 4 (Thu)</td>
|-
</tr><tr>
|LOCI_sAbbrevMonthName8||Abbreviation of month 8
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName5|LOCI_sDayName5]]</td>
|-
<td>Name of day of week 5 (Fri)</td>
|LOCI_sAbbrevMonthName9||Abbreviation of month 9
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sDayName6|LOCI_sDayName6]]</td>
|LOCI_sAbbrevMonthName10||Abbreviation of month 10
<td>Name of day of week 6 (Sat)</td>
|-
</tr><tr>
|LOCI_sAbbrevMonthName11||Abbreviation of month 11
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName1|LOCI_sAbbrevMonthName1]]</td>
|-
<td>Abbreviation of month 1</td>
|LOCI_sAbbrevMonthName12||Abbreviation of month 12
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName2|LOCI_sAbbrevMonthName2]]</td>
|LOCI_sMonthName1||Name of month 1
<td>Abbreviation of month 2</td>
|-
</tr><tr>
|LOCI_sMonthName2||Name of month 2
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName3|LOCI_sAbbrevMonthName3]]</td>
|-
<td>Abbreviation of month 3</td>
|LOCI_sMonthName3||Name of month 3
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName4|LOCI_sAbbrevMonthName4]]</td>
|LOCI_sMonthName4||Name of month 4
<td>Abbreviation of month 4</td>
|-
</tr><tr>
|LOCI_sMonthName5||Name of month 5
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName5|LOCI_sAbbrevMonthName5]]</td>
|-
<td>Abbreviation of month 5</td>
|LOCI_sMonthName6||Name of month 6
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName6|LOCI_sAbbrevMonthName6]]</td>
|LOCI_sMonthName7||Name of month 7
<td>Abbreviation of month 6</td>
|-
</tr><tr>
|LOCI_sMonthName8||Name of month 8
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName7|LOCI_sAbbrevMonthName7]]</td>
|-
<td>Abbreviation of month 7 </td>
|LOCI_sMonthName9||Name of month 9
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName8|LOCI_sAbbrevMonthName8]]</td>
|LOCI_sMonthName10||Name of month 10
<td>Abbreviation of month 8</td>
|-
</tr><tr>
|LOCI_sMonthName11||Name of month 11
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName9|LOCI_sAbbrevMonthName9]]</td>
|-
<td>Abbreviation of month 9</td>
|LOCI_sMonthName12||Name of month 12
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName10|LOCI_sAbbrevMonthName10]]</td>
|LOCI_sDecimal||Decimal point
<td>Abbreviation of month 10 </td>
|-
</tr><tr>
|LOCI_sThousand||Triad separator
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName11|LOCI_sAbbrevMonthName11]]</td>
|-
<td>Abbreviation of month 11 </td>
|LOCI_sYesString||Yes string
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName12|LOCI_sAbbrevMonthName12]]</td>
|LOCI_sNoString||No string
<td>Abbreviation of month 12 </td>
|-
</tr><tr>
|LOCI_sCurrency||Currency symbol
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName1|LOCI_sMonthName1]]</td>
|-
<td>Name of month 1</td>
|LOCI_sCodeSet||Locale codeset
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName2|LOCI_sMonthName2]]</td>
|LOCI_xLocaleToken||IBM Locale Token
<td>Name of month 2</td>
|-
</tr><tr>
|LOCI_xWinLocale||Win32 Locale ID
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName3|LOCI_sMonthName3]]</td>
|-
<td>Name of month 3</td>
|LOCI_iLocaleResnum||Resource number for description
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName4|LOCI_sMonthName4]]</td>
|LOCI_sNativeDigits||String of native digits
<td>Name of month 4</td>
|-
</tr><tr>
|LOCI_iMaxItem||Maximum item number
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName5|LOCI_sMonthName5]]</td>
|-
<td>Name of month 5</td>
|LOCI_sTimeMark||Time mark (am/pm) format
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName6|LOCI_sMonthName6]]</td>
|LOCI_sEra||Era definition
<td>Name of month 6</td>
|-
</tr><tr>
|LOCI_sAltShortDate||Alternate short date format string
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName7|LOCI_sMonthName7]]</td>
|-
<td>Name of month 7</td>
|LOCI_sAltDateTime||Alternate date and time format
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName8|LOCI_sMonthName8]]</td>
|LOCI_sAltTimeFormat||Alternate time format
<td>Name of month 8</td>
|-
</tr><tr>
|LOCI_sAltDigits||XPG4 alternate digits
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName9|LOCI_sMonthName9]]</td>
|-
<td>Name of month 9</td>
|LOCI_sYesExpr||XPG4 yes expression
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName10|LOCI_sMonthName10]]</td>
|LOCI_sNoExpr||XPG4 no expression
<td>Name of month 10 </td>
|-
</tr><tr>
|LOCI_sDate||Short date separator
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName11|LOCI_sMonthName11]]</td>
|-
<td>Name of month 11 </td>
|LOCI_sTime||Time separator
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName12|LOCI_sMonthName12]]</td>
|LOCI_sList||List separator
<td>Name of month 12 </td>
|-
</tr><tr>
|LOCI_sMonDecimalSep||Monetary currency separator
<td>[[OS2 API:Constant:LOCI#LOCI_sDecimal|LOCI_sDecimal]]</td>
|-
<td>Decimal point </td>
|LOCI_sMonThousandSep||Monetary triad separator
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sThousand|LOCI_sThousand]]</td>
|LOCI_sGrouping||Grouping of digits
<td>Triad separator </td>
|-
</tr><tr>
|LOCI_sMonGrouping||Monetary groupings
<td>[[OS2 API:Constant:LOCI#LOCI_sYesString|LOCI_sYesString]]</td>
|-
<td>Yes string</td>
|LOCI_iMeasure||Measurement (Metric, British)
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sNoString|LOCI_sNoString]]</td>
|LOCI_iPaper||Normal paper size
<td>No string</td>
|-
</tr><tr>
|LOCI_iDigits||Digits to right of decimal
<td>[[OS2 API:Constant:LOCI#LOCI_sCurrency|LOCI_sCurrency]]</td>
|-
<td>Currency symbol </td>
|LOCI_iTime||Clock format
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sCodeSet|LOCI_sCodeSet]]</td>
|LOCI_iDate||Format of short date
<td>Locale codeset </td>
|-
</tr><tr>
|LOCI_iCurrency||Format of currency
<td>[[OS2 API:Constant:LOCI#LOCI_xLocaleToken|LOCI_xLocaleToken]]</td>
|-
<td>IBM Locale Token </td>
|LOCI_iCurrDigits||Digits to right for currency
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_xWinLocale|LOCI_xWinLocale]]</td>
|LOCI_iLzero||Leading zero used
<td>Win32 Locale ID</td>
|-
</tr><tr>
|LOCI_iNegNumber||Format of negative number
<td>[[OS2 API:Constant:LOCI#LOCI_iLocaleResnum|LOCI_iLocaleResnum]]</td>
|-
<td>Resource number for description</td>
|LOCI_iLDate||Format of long date
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sNativeDigits|LOCI_sNativeDigits]]</td>
|LOCI_iCalendarType||Type of default calandar
<td>String of native digits</td>
|-
</tr><tr>
|LOCI_iFirstDayOfWeek||First day of week (0=Mon)
<td>[[OS2 API:Constant:LOCI#LOCI_iMaxItem|LOCI_iMaxItem]]</td>
|-
<td>Maximum item number</td>
|LOCI_iFirstWeekOfYear||First week of year
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sTimeMark|LOCI_sTimeMark]]</td>
|LOCI_iNegCurr||Format of negative currency
<td>Time mark (am/pm) format </td>
|-
</tr><tr>
|LOCI_iTLzero||Leading zero on time
<td>[[OS2 API:Constant:LOCI#LOCI_sEra|LOCI_sEra]]</td>
|-
<td>Era definition </td>
|LOCI_iTimePrefix||AM/PM preceeds time
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAltShortDate|LOCI_sAltShortDate]]</td>
|LOCI_iOptionalCalendar||Alternate calandar type
<td>Alternate short date format string</td>
|-
</tr><tr>
|LOCI_sIntlSymbol||International currency symbol
<td>[[OS2 API:Constant:LOCI#LOCI_sAltDateTime|LOCI_sAltDateTime]]</td>
|-
<td>Alternate date and time format </td>
|LOCI_sAbbrevLangName||Windows language abbreviation
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sAltTimeFormat|LOCI_sAltTimeFormat]]</td>
|LOCI_sCollate||Collation table
<td>Alternate time format</td>
|-
</tr><tr>
|LOCI_iUpperType||Upper case algorithm
<td>[[OS2 API:Constant:LOCI#LOCI_sAltDigits|LOCI_sAltDigits]]</td>
|-
<td>XPG4 alternate digist</td>
|LOCI_iUpperMissing||Action for missing upper case
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sYesExpr|LOCI_sYesExpr]]</td>
|LOCI_sPositiveSign||Positive sign
<td>xpg4 yes expression</td>
|-
</tr><tr>
|LOCI_sNegativeSign||Negative sign
<td>[[OS2 API:Constant:LOCI#LOCI_sNoExpr|LOCI_sNoExpr]]</td>
|-
<td>xpg4 no expression</td>
|LOCI_sLeftNegative||Left paren for negative
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sDate|LOCI_sDate]]</td>
|LOCI_sRightNegative||Right paren for negative
<td>Short date separator</td>
|-
</tr><tr>
|LOCI_sLongDate||Long date formatting string
<td>[[OS2 API:Constant:LOCI#LOCI_sTime|LOCI_sTime]]</td>
|-
<td>Time separator</td>
|LOCI_sAltLongDate||Alternate long date format string
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sList|LOCI_sList]]</td>
|LOCI_sMonthName13||Name of month 13
<td>List separator</td>
|-
</tr><tr>
|LOCI_sAbbrevMonthName13||Abbreviation of month 13
<td>[[OS2 API:Constant:LOCI#LOCI_sMonDecimalSep|LOCI_sMonDecimalSep]]</td>
|-
<td>Monetary currency separator</td>
|LOCI_sName||OS/2 locale name
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonThousandSep|LOCI_sMonThousandSep]]</td>
|LOCI_sLanguageID||Abbreviation for language (ISO)
<td>Monetary triad separator </td>
|-
</tr><tr>
|LOCI_sCountryID||Abbreviation for country (ISO)
<td>[[OS2 API:Constant:LOCI#LOCI_sGrouping|LOCI_sGrouping]]</td>
|-
<td>Grouping of digits </td>
|LOCI_sEngLanguage||English name of Language
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sMonGrouping|LOCI_sMonGrouping]]</td>
|LOCI_sLanguage||Native name of language
<td>Monetary groupings </td>
|-
</tr><tr>
|LOCI_sEngCountry||English name of country
<td>[[OS2 API:Constant:LOCI#LOCI_iMeasure|LOCI_iMeasure]]</td>
|-
<td>Measurement (Metric, British)</td>
|LOCI_sCountry||Name of country in current language
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iPaper|LOCI_iPaper]]</td>
|LOCI_sNativeCtryName||Name of country in native language
<td>Normal paper size</td>
|-
</tr><tr>
|LOCI_iCountry||Country code
<td>[[OS2 API:Constant:LOCI#LOCI_iDigits|LOCI_iDigits]]</td>
|-
<td>Digits to right of decimal</td>
|LOCI_sISOCodepage||ISO codepage name
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iTime|LOCI_iTime]]</td>
|LOCI_iAnsiCodepage||Windows codepage
<td>Clock format</td>
|-
</tr><tr>
|LOCI_iCodepage||OS/2 primary codepage
<td>[[OS2 API:Constant:LOCI#LOCI_iDate|LOCI_iDate]]</td>
|-
<td>Format of short date</td>
|LOCI_iAltCodepage||OS/2 alternate codepage
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iCurrency|LOCI_iCurrency]]</td>
|LOCI_iMacCodepage||Mac codepage
<td>Format of currency </td>
|-
</tr><tr>
|LOCI_iEbcdicCodepage||Ebcdic codepage
<td>[[OS2 API:Constant:LOCI#LOCI_iCurrDigits|LOCI_iCurrDigits]]</td>
|-
<td>Digits to right for currency </td>
|LOCI_sOtherCodepages||Other ASCII codepages
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iLzero|LOCI_iLzero]]</td>
|LOCI_sSetCodepage||Codpage to set on activation
<td>Leading zero used</td>
|-
</tr><tr>
|LOCI_sKeyboard||Primary keyboard name
<td>[[OS2 API:Constant:LOCI#LOCI_iNegNumber|LOCI_iNegNumber]]</td>
|-
<td>Format of negative number </td>
|LOCI_sAltKeyboard||Alternate keyboard name
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iLDate|LOCI_iLDate]]</td>
|LOCI_sSetKeyboard||Keyboard to set on activation
<td>Format of long date</td>
|-
</tr><tr>
|LOCI_sDebit|||Debit string
<td>[[OS2 API:Constant:LOCI#LOCI_iCalendarType|LOCI_iCalendarType]]</td>
|-
<td>Type of default calandar </td>
|LOCI_sCredit||Credit string
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iFirstDayOfWeek|LOCI_iFirstDayOfWeek]]</td>
|LOCI_sLatin1Locale||Locale for Latin 1 names
<td>First day of week (0=Mon)</td>
|-
</tr><tr>
|LOCI_wTimeFormat||Win32 Time format
<td>[[OS2 API:Constant:LOCI#LOCI_iFirstWeekOfYear|LOCI_iFirstWeekOfYear]]</td>
|-
<td>First week of year </td>
|LOCI_wShortDate||Win32 Date format
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iNegCurr|LOCI_iNegCurr]]</td>
|LOCI_wLongDate||Win32 Long date format
<td>Format of negative currency</td>
|-
</tr><tr>
|LOCI_jISO3CountryName||Java Abbrev for country (ISO-3)
<td>[[OS2 API:Constant:LOCI#LOCI_iTLzero|LOCI_iTLzero]]</td>
|-
<td>Leading zero on time</td>
|LOCI_jPercentPattern||Java percent pattern
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_iTimePrefix|LOCI_iTimePrefix]]</td>
|LOCI_jPercentSign||Java percent symbol
<td>AM/PM preceeds time </td>
|-
</tr><tr>
|LOCI_jExponent||Java exponential symbol
<td>[[OS2 API:Constant:LOCI#LOCI_iOptionalCalendar|LOCI_iOptionalCalendar]]</td>
|-
<td>Alternate calandar type</td>
|LOCI_jFullTimeFormat||Java full time format
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sIntlSymbol|LOCI_sIntlSymbol]]</td>
|LOCI_jLongTimeFormat||Java long time format
<td>International currency symbol</td>
|-
</tr><tr>
|LOCI_jShortTimeFormat||Java short time format
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevLangName|LOCI_sAbbrevLangName]]</td>
|-
<td>Windows language abbreviation</td>
|LOCI_jFullDateFormat||Java full date format
</tr><tr>
|-
<td>[[OS2 API:Constant:LOCI#LOCI_sCollate|LOCI_sCollate]]</td>
|LOCI_jMediumDateFormat||Java medium date format
<td>Collation table</td>
|-
</tr><tr>
|LOCI_jDateTimePattern||Java date time format pattern
<td>[[OS2 API:Constant:LOCI#LOCI_iUpperType|LOCI_iUpperType]]</td>
|-
<td>Upper case algorithm </td>
|LOCI_jEraString||Java era strings
</tr><tr>
|}
<td>[[OS2 API:Constant:LOCI#LOCI_iUpperMissing|LOCI_iUpperMissing]]</td>
<td>Action for missing upper case</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sPositiveSign|LOCI_sPositiveSign]]</td>
<td>Positive sign</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sNegativeSign|LOCI_sNegativeSign]]</td>
<td>Negative sign</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sLeftNegative|LOCI_sLeftNegative]]</td>
<td>Left paren for negative</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sRightNegative|LOCI_sRightNegative]]</td>
<td>Right paren for negative </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sLongDate|LOCI_sLongDate]]</td>
<td>Long date formatting string
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sAltLongDate|LOCI_sAltLongDate]]</td>
<td>Alternate long date format string </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sMonthName13|LOCI_sMonthName13]]</td>
<td>Name of month 13 </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sAbbrevMonthName13|LOCI_sAbbrevMonthName13]]</td>
<td>Abbreviation of month 13 </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sName|LOCI_sName]]</td>
<td>OS/2 locale name</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sLanguageID|LOCI_sLanguageID]]</td>
<td>Abbreviation for language (ISO)</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sCountryID|LOCI_sCountryID]]</td>
<td>Abbreviation for country (ISO) </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sEngLanguage|LOCI_sEngLanguage]]</td>
<td>English name of Language </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sLanguage|LOCI_sLanguage]]</td>
<td>Native name of language</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sEngCountry|LOCI_sEngCountry]]</td>
<td>English name of country</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sCountry|LOCI_sCountry]]</td>
<td>Name of country in current language</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sNativeCtryName|LOCI_sNativeCtryName]]</td>
<td>Name of country in native language</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_iCountry|LOCI_iCountry]]</td>
<td>Country code</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sISOCodepage|LOCI_sISOCodepage]]</td>
<td>ISO codepage name</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_iAnsiCodepage|LOCI_iAnsiCodepage]]</td>
<td>Windows codepage </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_iCodepage|LOCI_iCodepage]]</td>
<td>OS/2 primary codepage</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_iAltCodepage|LOCI_iAltCodepage]]</td>
<td>OS/2 alternate codepage</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_iMacCodepage|LOCI_iMacCodepage]]</td>
<td>Mac codepage </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_iEbcdicCodepage|LOCI_iEbcdicCodepage]]</td>
<td>Ebcdic codepage</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sOtherCodepages|LOCI_sOtherCodepages]]</td>
<td>Other ASCII codepages</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sSetCodepage|LOCI_sSetCodepage]]</td>
<td>Codpage to set on activation </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sKeyboard|LOCI_sKeyboard]]</td>
<td>Primary keyboard name</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sAltKeyboard|LOCI_sAltKeyboard]]</td>
<td>Alternate keyboard name</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sSetKeyboard|LOCI_sSetKeyboard]]</td>
<td>Keyboard to set on activation</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sDebit|LOCI_sDebit]]</td>
<td>Debit string</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sCredit|LOCI_sCredit]]</td>
<td>Credit string</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_sLatin1Locale|LOCI_sLatin1Locale]]</td>
<td>Locale for Latin 1 names </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_wTimeFormat|LOCI_wTimeFormat]]</td>
<td>Win32 Time format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_wShortDate|LOCI_wShortDate]]</td>
<td>Win32 Date format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_wLongDate|LOCI_wLongDate]]</td>
<td>Win32 Long date format </td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jISO3CountryName|LOCI_jISO3CountryName]]</td>
<td>Java Abbrev for country (ISO-3)</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jPercentPattern|LOCI_jPercentPattern]]</td>
<td>Java percent pattern</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jPercentSign|LOCI_jPercentSign]]</td>
<td>Java percent symbol</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jExponent|LOCI_jExponent]]</td>
<td>Java exponential symbol</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jFullTimeFormat|LOCI_jFullTimeFormat]]</td>
<td>Java full time format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jLongTimeFormat|LOCI_jLongTimeFormat]]</td>
<td>Java long time format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jShortTimeFormat|LOCI_jShortTimeFormat]]</td>
<td>Java short time format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jFullDateFormat|LOCI_jFullDateFormat]]</td>
<td>Java full date format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jMediumDateFormat|LOCI_jMediumDateFormat]]</td>
<td>Java medium date format</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jDateTimePattern|LOCI_jDateTimePattern]]</td>
<td>Java date time format pattern</td>
</tr><tr>
<td>[[OS2 API:Constant:LOCI#LOCI_jEraStrings|LOCI_jEraString]]</td>
<td>Java era strings</td>
</tr>
</table>


=== OS Version Introduced ===
=== OS Version Introduced ===
OS/2 Warp
OS/2 Warp
[[Category:Uni]]

Latest revision as of 18:53, 26 July 2017

Get the locale information.

Syntax

UniQueryLocaleItem(localeObj, queryItem, result);

Parameters

localeObj - LocaleObject - input
The locale object created from UniCreateLocaleObject.
queryItem - LocaleItem - input
The item to be queried.
result - UniChar - output
The locale information received.

Returns

An integer with values of:

Calling Convention

Cdecl32

Example Code

LocaleObject localeObj;
LocaleItem   queryItem;
UniChar      result;
integer      rc;
...
rc = UniQueryLocaleItem(localeObj, queryItem, result);
...

Related Functions

  • UniSetUserLocaleItem

Notes

UniQueryLocaleItem returns a pointer in result to a null-terminated UniChar string containing information found in the locale object identified by localeObj about the language or cultural item named by the item argument. UniQueryLocaleItem allocates the memory to hold the UniChar string and returns a pointer in result. Use UniFreeMem to free the memory associated with result by UniQueryLocaleItem.

The constant names and values for queryItem are contained in ulsitem.h:

Item Name Item Description
LOCI_sDateTime Date and time format string
LOCI_sShortDate Short date format
LOCI_sTimeFormat Time format string
LOCI_s1159 AM string
LOCI_s2359 PM string
LOCI_sAbbrevDayName7 Abbreviation of day 7 (Sun)
LOCI_sAbbrevDayName1 Abbreviation of day 1 (Mon)
LOCI_sAbbrevDayName2 Abbreviation of day 2 (Tue)
LOCI_sAbbrevDayName3 Abbreviation of day 3 (Wed)
LOCI_sAbbrevDayName4 Abbreviation of day 4 (Thu)
LOCI_sAbbrevDayName5 Abbreviation of day 5 (Fri)
LOCI_sAbbrevDayName6 Abbreviation of day 6 (Sat)
LOCI_sDayName7 Name of day of week 7 (Sun)
LOCI_sDayName1 Name of day of week 1 (Mon)
LOCI_sDayName2 Name of day of week 2 (Tue)
LOCI_sDayName3 Name of day of week 3 (Wed)
LOCI_sDayName4 Name of day of week 4 (Thu)
LOCI_sDayName5 Name of day of week 5 (Fri)
LOCI_sDayName6 Name of day of week 6 (Sat)
LOCI_sAbbrevMonthName1 Abbreviation of month 1
LOCI_sAbbrevMonthName2 Abbreviation of month 2
LOCI_sAbbrevMonthName3 Abbreviation of month 3
LOCI_sAbbrevMonthName4 Abbreviation of month 4
LOCI_sAbbrevMonthName5 Abbreviation of month 5
LOCI_sAbbrevMonthName6 Abbreviation of month 6
LOCI_sAbbrevMonthName7 Abbreviation of month 7
LOCI_sAbbrevMonthName8 Abbreviation of month 8
LOCI_sAbbrevMonthName9 Abbreviation of month 9
LOCI_sAbbrevMonthName10 Abbreviation of month 10
LOCI_sAbbrevMonthName11 Abbreviation of month 11
LOCI_sAbbrevMonthName12 Abbreviation of month 12
LOCI_sMonthName1 Name of month 1
LOCI_sMonthName2 Name of month 2
LOCI_sMonthName3 Name of month 3
LOCI_sMonthName4 Name of month 4
LOCI_sMonthName5 Name of month 5
LOCI_sMonthName6 Name of month 6
LOCI_sMonthName7 Name of month 7
LOCI_sMonthName8 Name of month 8
LOCI_sMonthName9 Name of month 9
LOCI_sMonthName10 Name of month 10
LOCI_sMonthName11 Name of month 11
LOCI_sMonthName12 Name of month 12
LOCI_sDecimal Decimal point
LOCI_sThousand Triad separator
LOCI_sYesString Yes string
LOCI_sNoString No string
LOCI_sCurrency Currency symbol
LOCI_sCodeSet Locale codeset
LOCI_xLocaleToken IBM Locale Token
LOCI_xWinLocale Win32 Locale ID
LOCI_iLocaleResnum Resource number for description
LOCI_sNativeDigits String of native digits
LOCI_iMaxItem Maximum item number
LOCI_sTimeMark Time mark (am/pm) format
LOCI_sEra Era definition
LOCI_sAltShortDate Alternate short date format string
LOCI_sAltDateTime Alternate date and time format
LOCI_sAltTimeFormat Alternate time format
LOCI_sAltDigits XPG4 alternate digits
LOCI_sYesExpr XPG4 yes expression
LOCI_sNoExpr XPG4 no expression
LOCI_sDate Short date separator
LOCI_sTime Time separator
LOCI_sList List separator
LOCI_sMonDecimalSep Monetary currency separator
LOCI_sMonThousandSep Monetary triad separator
LOCI_sGrouping Grouping of digits
LOCI_sMonGrouping Monetary groupings
LOCI_iMeasure Measurement (Metric, British)
LOCI_iPaper Normal paper size
LOCI_iDigits Digits to right of decimal
LOCI_iTime Clock format
LOCI_iDate Format of short date
LOCI_iCurrency Format of currency
LOCI_iCurrDigits Digits to right for currency
LOCI_iLzero Leading zero used
LOCI_iNegNumber Format of negative number
LOCI_iLDate Format of long date
LOCI_iCalendarType Type of default calandar
LOCI_iFirstDayOfWeek First day of week (0=Mon)
LOCI_iFirstWeekOfYear First week of year
LOCI_iNegCurr Format of negative currency
LOCI_iTLzero Leading zero on time
LOCI_iTimePrefix AM/PM preceeds time
LOCI_iOptionalCalendar Alternate calandar type
LOCI_sIntlSymbol International currency symbol
LOCI_sAbbrevLangName Windows language abbreviation
LOCI_sCollate Collation table
LOCI_iUpperType Upper case algorithm
LOCI_iUpperMissing Action for missing upper case
LOCI_sPositiveSign Positive sign
LOCI_sNegativeSign Negative sign
LOCI_sLeftNegative Left paren for negative
LOCI_sRightNegative Right paren for negative
LOCI_sLongDate Long date formatting string
LOCI_sAltLongDate Alternate long date format string
LOCI_sMonthName13 Name of month 13
LOCI_sAbbrevMonthName13 Abbreviation of month 13
LOCI_sName OS/2 locale name
LOCI_sLanguageID Abbreviation for language (ISO)
LOCI_sCountryID Abbreviation for country (ISO)
LOCI_sEngLanguage English name of Language
LOCI_sLanguage Native name of language
LOCI_sEngCountry English name of country
LOCI_sCountry Name of country in current language
LOCI_sNativeCtryName Name of country in native language
LOCI_iCountry Country code
LOCI_sISOCodepage ISO codepage name
LOCI_iAnsiCodepage Windows codepage
LOCI_iCodepage OS/2 primary codepage
LOCI_iAltCodepage OS/2 alternate codepage
LOCI_iMacCodepage Mac codepage
LOCI_iEbcdicCodepage Ebcdic codepage
LOCI_sOtherCodepages Other ASCII codepages
LOCI_sSetCodepage Codpage to set on activation
LOCI_sKeyboard Primary keyboard name
LOCI_sAltKeyboard Alternate keyboard name
LOCI_sSetKeyboard Keyboard to set on activation
LOCI_sDebit Debit string
LOCI_sCredit Credit string
LOCI_sLatin1Locale Locale for Latin 1 names
LOCI_wTimeFormat Win32 Time format
LOCI_wShortDate Win32 Date format
LOCI_wLongDate Win32 Long date format
LOCI_jISO3CountryName Java Abbrev for country (ISO-3)
LOCI_jPercentPattern Java percent pattern
LOCI_jPercentSign Java percent symbol
LOCI_jExponent Java exponential symbol
LOCI_jFullTimeFormat Java full time format
LOCI_jLongTimeFormat Java long time format
LOCI_jShortTimeFormat Java short time format
LOCI_jFullDateFormat Java full date format
LOCI_jMediumDateFormat Java medium date format
LOCI_jDateTimePattern Java date time format pattern
LOCI_jEraString Java era strings

OS Version Introduced

OS/2 Warp