Jump to content

UniQueryLocaleItem: Difference between revisions

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