nls.html
来自「perl教程」· HTML 代码 · 共 809 行 · 第 1/2 页
HTML
809 行
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../../displayToc.js"></script>
<script language="JavaScript" src="../../../tocParas.js"></script>
<script language="JavaScript" src="../../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../../scineplex.css">
<title>Win32::OLE::NLS - OLE National Language Support</title>
<link rel="stylesheet" href="../../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',3);</script>
<h1><a>Win32::OLE::NLS - OLE National Language Support</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<ul>
<li><a href="#functions">Functions</a></li>
<li><a href="#locale_types">Locale Types</a></li>
</ul>
<li><a href="#authors_copyright">AUTHORS/COPYRIGHT</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Win32::OLE::NLS - OLE National Language Support</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
missing</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module provides access to the national language support features
in the <em>OLENLS.DLL</em>.</p>
<p>
</p>
<h2><a name="functions">Functions</a></h2>
<dl>
<dt><strong><a name="item_comparestring"><code>CompareString(LCID,FLAGS,STR1,STR2)</code></a></strong>
<dd>
<p>Compare STR1 and STR2 in the LCID locale. FLAGS indicate the character
traits to be used or ignored when comparing the two strings.</p>
</dd>
<dd>
<pre>
NORM_IGNORECASE Ignore case
NORM_IGNOREKANATYPE Ignore hiragana/katakana character differences
NORM_IGNORENONSPACE Ignore accents, diacritics, and vowel marks
NORM_IGNORESYMBOLS Ignore symbols
NORM_IGNOREWIDTH Ignore character width</pre>
</dd>
<dd>
<p>Possible return values are:</p>
</dd>
<dd>
<pre>
0 Function failed
1 STR1 is less than STR2
2 STR1 is equal to STR2
3 STR1 is greater than STR2</pre>
</dd>
<dd>
<p>Note that you can subtract 2 from the return code to get values
comparable to the <code>cmp</code> operator.</p>
</dd>
</li>
<dt><strong><a name="item_lcmapstring"><code>LCMapString(LCID,FLAGS,STR)</code></a></strong>
<dd>
<p>LCMapString translates STR using LCID dependent translation.
Flags contains a combination of the following options:</p>
</dd>
<dd>
<pre>
LCMAP_LOWERCASE Lowercase
LCMAP_UPPERCASE Uppercase
LCMAP_HALFWIDTH Narrow characters
LCMAP_FULLWIDTH Wide characters
LCMAP_HIRAGANA Hiragana
LCMAP_KATAKANA Katakana
LCMAP_SORTKEY Character sort key</pre>
</dd>
<dd>
<p>The following normalization options can be combined with <code>LCMAP_SORTKEY</code>:</p>
</dd>
<dd>
<pre>
NORM_IGNORECASE Ignore case
NORM_IGNOREKANATYPE Ignore hiragana/katakana character differences
NORM_IGNORENONSPACE Ignore accents, diacritics, and vowel marks
NORM_IGNORESYMBOLS Ignore symbols
NORM_IGNOREWIDTH Ignore character width</pre>
</dd>
<dd>
<p>The return value is the translated string.</p>
</dd>
</li>
<dt><strong><a name="item_getlocaleinfo"><code>GetLocaleInfo(LCID,LCTYPE)</code></a></strong>
<dd>
<p>Retrieve locale setting LCTYPE from the locale specified by LCID. Use
LOCALE_NOUSEROVERRIDE | LCTYPE to always query the locale database.
Otherwise user changes to <code>win.ini</code> through the windows control panel
take precedence when retrieving values for the system default locale.
See the documentation below for a list of valid LCTYPE values.</p>
</dd>
<dd>
<p>The return value is the contents of the requested locale setting.</p>
</dd>
</li>
<dt><strong><a name="item_getstringtype"><code>GetStringType(LCID,TYPE,STR)</code></a></strong>
<dd>
<p>Retrieve type information from locale LCID about each character in STR.
The requested TYPE can be one of the following 3 levels:</p>
</dd>
<dd>
<pre>
CT_CTYPE1 ANSI C and POSIX type information
CT_CTYPE2 Text layout type information
CT_CTYPE3 Text processing type information</pre>
</dd>
<dd>
<p>The return value is a list of values, each of wich is a bitwise OR of
the applicable type bits from the corresponding table below:</p>
</dd>
<dd>
<pre>
<span class="variable">@ct</span> <span class="operator">=</span> <span class="variable">GetStringType</span><span class="operator">(</span><span class="variable">LOCALE_SYSTEM_DEFAULT</span><span class="operator">,</span> <span class="variable">CT_CTYPE1</span><span class="operator">,</span> <span class="string">"String"</span><span class="operator">);</span>
</pre>
</dd>
<dd>
<p>ANSI C and POSIX character type information:</p>
</dd>
<dd>
<pre>
C1_UPPER Uppercase
C1_LOWER Lowercase
C1_DIGIT Decimal digits
C1_SPACE Space characters
C1_PUNCT Punctuation
C1_CNTRL Control characters
C1_BLANK Blank characters
C1_XDIGIT Hexadecimal digits
C1_ALPHA Any letter</pre>
</dd>
<dd>
<p>Text layout type information:</p>
</dd>
<dd>
<pre>
C2_LEFTTORIGHT Left to right
C2_RIGHTTOLEFT Right to left
C2_EUROPENUMBER European number, European digit
C2_EUROPESEPARATOR European numeric separator
C2_EUROPETERMINATOR European numeric terminator
C2_ARABICNUMBER Arabic number
C2_COMMONSEPARATOR Common numeric separator
C2_BLOCKSEPARATOR Block separator
C2_SEGMENTSEPARATOR Segment separator
C2_WHITESPACE White space
C2_OTHERNEUTRAL Other neutrals
C2_NOTAPPLICABLE No implicit direction (e.g. ctrl codes)</pre>
</dd>
<dd>
<p>Text precessing type information:</p>
</dd>
<dd>
<pre>
C3_NONSPACING Nonspacing mark
C3_DIACRITIC Diacritic nonspacing mark
C3_VOWELMARK Vowel nonspacing mark
C3_SYMBOL Symbol
C3_KATAKANA Katakana character
C3_HIRAGANA Hiragana character
C3_HALFWIDTH Narrow character
C3_FULLWIDTH Wide character
C3_IDEOGRAPH Ideograph
C3_ALPHA Any letter
C3_NOTAPPLICABLE Not applicable</pre>
</dd>
</li>
<dt><strong><a name="item_getsystemdefaultlangid"><code>GetSystemDefaultLangID()</code></a></strong>
<dd>
<p>Returns the system default language identifier.</p>
</dd>
</li>
<dt><strong><a name="item_getsystemdefaultlcid"><code>GetSystemDefaultLCID()</code></a></strong>
<dd>
<p>Returns the system default locale identifier.</p>
</dd>
</li>
<dt><strong><a name="item_getuserdefaultlangid"><code>GetUserDefaultLangID()</code></a></strong>
<dd>
<p>Returns the user default language identifier.</p>
</dd>
</li>
<dt><strong><a name="item_getuserdefaultlcid"><code>GetUserDefaultLCID()</code></a></strong>
<dd>
<p>Returns the user default locale identifier.</p>
</dd>
</li>
<dt><strong><a name="item_sendsettingchange"><code>SendSettingChange()</code></a></strong>
<dd>
<p>Sends a WM_SETTINGCHANGE message to all top level windows.</p>
</dd>
</li>
<dt><strong><a name="item_setlocaleinfo">SetLocaleInfo(LCID, LCTYPE, LCDATA)</a></strong>
<dd>
<p>Changes an item in the user override part of the locale setting LCID.
It doesn't change the system default database. The following LCTYPEs are
changeable:</p>
</dd>
<dd>
<pre>
LOCALE_ICALENDARTYPE LOCALE_SDATE
LOCALE_ICURRDIGITS LOCALE_SDECIMAL
LOCALE_ICURRENCY LOCALE_SGROUPING
LOCALE_IDIGITS LOCALE_SLIST
LOCALE_IFIRSTDAYOFWEEK LOCALE_SLONGDATE
LOCALE_IFIRSTWEEKOFYEAR LOCALE_SMONDECIMALSEP
LOCALE_ILZERO LOCALE_SMONGROUPING
LOCALE_IMEASURE LOCALE_SMONTHOUSANDSEP
LOCALE_INEGCURR LOCALE_SNEGATIVESIGN
LOCALE_INEGNUMBER LOCALE_SPOSITIVESIGN
LOCALE_IPAPERSIZE LOCALE_SSHORTDATE
LOCALE_ITIME LOCALE_STHOUSAND
LOCALE_S1159 LOCALE_STIME
LOCALE_S2359 LOCALE_STIMEFORMAT
LOCALE_SCURRENCY LOCALE_SYEARMONTH</pre>
</dd>
<dd>
<p>You have to call <a href="#item_sendsettingchange"><code>SendSettingChange()</code></a> to activate these changes for
subsequent Win32::OLE::Variant object formatting because the OLE
subsystem seems to cache locale information.</p>
</dd>
</li>
<dt><strong><a name="item_makelangid"><code>MAKELANGID(LANG,SUBLANG)</code></a></strong>
<dd>
<p>Creates a lnguage identifier from a primary language and a sublanguage.</p>
</dd>
</li>
<dt><strong><a name="item_primarylangid"><code>PRIMARYLANGID(LANGID)</code></a></strong>
<dd>
<p>Retrieves the primary language from a language identifier.</p>
</dd>
</li>
<dt><strong><a name="item_sublangid"><code>SUBLANGID(LANGID)</code></a></strong>
<dd>
<p>Retrieves the sublanguage from a language identifier.</p>
</dd>
</li>
<dt><strong><a name="item_makelcid"><code>MAKELCID(LANGID)</code></a></strong>
<dd>
<p>Creates a locale identifies from a language identifier.</p>
</dd>
</li>
<dt><strong><a name="item_langidfromlcid"><code>LANGIDFROMLCID(LCID)</code></a></strong>
<dd>
<p>Retrieves a language identifier from a locale identifier.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="locale_types">Locale Types</a></h2>
<dl>
<dt><strong><a name="item_locale_ilanguage">LOCALE_ILANGUAGE</a></strong>
<dd>
<p>The language identifier (in hex).</p>
</dd>
</li>
<dt><strong><a name="item_locale_slanguage">LOCALE_SLANGUAGE</a></strong>
<dd>
<p>The localized name of the language.</p>
</dd>
</li>
<dt><strong><a name="item_locale_senglanguage">LOCALE_SENGLANGUAGE</a></strong>
<dd>
<p>The ISO Standard 639 English name of the language.</p>
</dd>
</li>
<dt><strong><a name="item_locale_sabbrevlangname">LOCALE_SABBREVLANGNAME</a></strong>
<dd>
<p>The three-letter abbreviated name of the language. The first two
letters are from the ISO Standard 639 language name abbreviation. The
third letter indicates the sublanguage type.</p>
</dd>
</li>
<dt><strong><a name="item_locale_snativelangname">LOCALE_SNATIVELANGNAME</a></strong>
<dd>
<p>The native name of the language.</p>
</dd>
</li>
<dt><strong><a name="item_locale_icountry">LOCALE_ICOUNTRY</a></strong>
<dd>
<p>The country code, which is based on international phone codes.</p>
</dd>
</li>
<dt><strong><a name="item_locale_scountry">LOCALE_SCOUNTRY</a></strong>
<dd>
<p>The localized name of the country.</p>
</dd>
</li>
<dt><strong><a name="item_locale_sengcountry">LOCALE_SENGCOUNTRY</a></strong>
<dd>
<p>The English name of the country.</p>
</dd>
</li>
<dt><strong><a name="item_locale_sabbrevctryname">LOCALE_SABBREVCTRYNAME</a></strong>
<dd>
<p>The ISO Standard 3166 abbreviated name of the country.</p>
</dd>
</li>
<dt><strong><a name="item_locale_snativectryname">LOCALE_SNATIVECTRYNAME</a></strong>
<dd>
<p>The native name of the country.</p>
</dd>
</li>
<dt><strong><a name="item_locale_idefaultlanguage">LOCALE_IDEFAULTLANGUAGE</a></strong>
<dd>
<p>Language identifier for the principal language spoken in this
locale.</p>
</dd>
</li>
<dt><strong><a name="item_locale_idefaultcountry">LOCALE_IDEFAULTCOUNTRY</a></strong>
<dd>
<p>Country code for the principal country in this locale.</p>
</dd>
</li>
<dt><strong><a name="item_locale_idefaultansicodepage">LOCALE_IDEFAULTANSICODEPAGE</a></strong>
<dd>
<p>The ANSI code page associated with this locale. Format: 4 Unicode
decimal digits plus a Unicode null terminator.</p>
</dd>
<dd>
<p>XXX This should be translated by GetLocaleInfo. XXX</p>
</dd>
</li>
<dt><strong><a name="item_locale_idefaultcodepage">LOCALE_IDEFAULTCODEPAGE</a></strong>
<dd>
<p>The OEM code page associated with the country.</p>
</dd>
</li>
<dt><strong><a name="item_locale_slist">LOCALE_SLIST</a></strong>
<dd>
<p>Characters used to separate list items (often a comma).</p>
</dd>
</li>
<dt><strong><a name="item_locale_imeasure">LOCALE_IMEASURE</a></strong>
<dd>
<p>Default measurement system:</p>
</dd>
<dd>
<pre>
0 metric system (S.I.)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?