<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.nl-langinfo.php',
    1 => 'nl_langinfo',
    2 => 'Возвращает информацию о языке и локали',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'Функции для работы со строками',
  ),
  'prev' => 
  array (
    0 => 'function.money-format.php',
    1 => 'money_format',
  ),
  'next' => 
  array (
    0 => 'function.nl2br.php',
    1 => 'nl2br',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/strings/functions/nl-langinfo.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.nl-langinfo" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">nl_langinfo</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">nl_langinfo</span> &mdash; <span class="dc-title">Возвращает информацию о языке и локали</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.nl-langinfo-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>nl_langinfo</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$item</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Функцию <span class="function"><strong>nl_langinfo()</strong></span> вызывают, чтобы получить доступ к отдельным
   элементам различных категорий текущей локали.
   В отличие от функции <span class="function"><a href="function.localeconv.php" class="function">localeconv()</a></span>, которая возвращает все
   элементы, функция <span class="function"><strong>nl_langinfo()</strong></span> разрешает выбрать
   отдельный элемент.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.nl-langinfo-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">item</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">item</code> может быть целым числом или
       соответствующей константой. Ниже приведены возможные
       константы для <code class="parameter">item</code> и их
       описания. Для некоторых локалей отдельные константы могут быть
       не определены.
       <table class="doctable table">
        <caption><strong>Константы nl_langinfo</strong></caption>
        
         <col />
         <col />
         <thead>
          <tr>
           <th>Константа</th>
           <th>Описание</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td colspan="2" style="text-align: center;">
            <em>Константы категории <strong><code><a href="string.constants.php#constant.lc-time">LC_TIME</a></code></strong></em>
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.abday-1">ABDAY_<span class="replaceable">(1-7)</span></a></code></strong></td>
           <td>Сокращённое название n-го дня недели.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.day-1">DAY_<span class="replaceable">(1-7)</span></a></code></strong></td>
           <td>Полное название n-го дня недели (DAY_1 соответствует воскресенью).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.abmon-1">ABMON_<span class="replaceable">(1-12)</span></a></code></strong></td>
           <td>Сокращённое название n-го месяца.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.mon-1">MON_<span class="replaceable">(1-12)</span></a></code></strong></td>
           <td>Полное название n-го месяца.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.am-str">AM_STR</a></code></strong></td>
           <td>Обозначение &quot;до полудня&quot;.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.pm-str">PM_STR</a></code></strong></td>
           <td>Обозначение &quot;после полудня&quot;.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.d-t-fmt">D_T_FMT</a></code></strong></td>
           <td>
            Строка, которую можно использовать в качестве формата
            с функцией <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span> для вывода даты и времени.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.d-fmt">D_FMT</a></code></strong></td>
           <td>
            Строка, которую можно использовать в качестве формата
            с функцией <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span> для вывода даты.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.t-fmt">T_FMT</a></code></strong></td>
           <td>
            Строка, которую можно использовать в качестве формата
            с функцией <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span> для вывода времени.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.t-fmt-ampm">T_FMT_AMPM</a></code></strong></td>
           <td>
            Строка, которую можно использовать в качестве формата
            с функцией <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span> для вывода времени в 12-часовом формате.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.era">ERA</a></code></strong></td>
           <td>Эра</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.era-year">ERA_YEAR</a></code></strong></td>
           <td>Год в формате с эрой</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.era-d-t-fmt">ERA_D_T_FMT</a></code></strong></td>
           <td>
            Дата и время в формате с эрой (строка, которую можно
            использовать в качестве формата с функцией
            <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>).
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.era-d-fmt">ERA_D_FMT</a></code></strong></td>
           <td>
            Дата в формате с эрой (строка, которую можно
            использовать в качестве формата с функцией
            <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>).
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.era-t-fmt">ERA_T_FMT</a></code></strong></td>
           <td>
            Время в формате с эрой (строка, которую можно
            использовать в качестве формата с функцией
            <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>).
           </td>
          </tr>

          <tr>
           <td colspan="2" style="text-align: center;">
            <em>Константы категории <strong><code><a href="string.constants.php#constant.lc-monetary">LC_MONETARY</a></code></strong></em>
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.int-curr-symbol">INT_CURR_SYMBOL</a></code></strong></td>
           <td>Международное обозначение валюты.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong></td>
           <td>Национальное обозначение валюты.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.crncystr">CRNCYSTR</a></code></strong></td>
           <td>Аналог <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong>.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.mon-decimal-point">MON_DECIMAL_POINT</a></code></strong></td>
           <td>Символ десятичной точки.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.mon-thousands-sep">MON_THOUSANDS_SEP</a></code></strong></td>
           <td>Разделитель тысяч (групп из 3 цифр).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.mon-grouping">MON_GROUPING</a></code></strong></td>
           <td>Аналогичен элементу <code class="literal">&quot;grouping&quot;</code>.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.positive-sign">POSITIVE_SIGN</a></code></strong></td>
           <td>Знак для положительных чисел.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.negative-sign">NEGATIVE_SIGN</a></code></strong></td>
           <td>Знак для отрицательных чисел.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.int-frac-digits">INT_FRAC_DIGITS</a></code></strong></td>
           <td>Количество знаков после запятой (международный формат).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.frac-digits">FRAC_DIGITS</a></code></strong></td>
           <td>Количество знаков после запятой (национальный формат).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.p-cs-precedes">P_CS_PRECEDES</a></code></strong></td>
           <td>Возвращает 1, если <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong> записывается перед положительным значением.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.p-sep-by-space">P_SEP_BY_SPACE</a></code></strong></td>
           <td>Возвращает 1, если <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong> отделяется от положительного значения пробелом.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.n-cs-precedes">N_CS_PRECEDES</a></code></strong></td>
           <td>Возвращает 1, если <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong> записывается перед отрицательным значением.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.n-sep-by-space">N_SEP_BY_SPACE</a></code></strong></td>
           <td>Возвращает 1, если <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong> отделяется от отрицательного значения пробелом.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.p-sign-posn">P_SIGN_POSN</a></code></strong></td>
           <td rowspan="2" style="vertical-align: middle;">
            <ul class="itemizedlist">
             <li class="listitem">
              <span class="simpara">
               Возвращает 0, если число и обозначение валюты <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong> заключаются в скобки
              </span>
             </li>
             <li class="listitem">
              <span class="simpara">
               Возвращает 1, если знак записывается перед числом и обозначением валюты <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong>
              </span>
             </li>
             <li class="listitem">
              <span class="simpara">
               Возвращает 2, если знак записывается после числа и обозначения валюты <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong>
              </span>
             </li>
             <li class="listitem">
              <span class="simpara">
               Возвращает 3, если знак записывается перед обозначением валюты <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong>
              </span>
             </li>
             <li class="listitem">
              <span class="simpara">
               Возвращает 4, если знак записывается после обозначения валюты <strong><code><a href="string.constants.php#constant.currency-symbol">CURRENCY_SYMBOL</a></code></strong>
              </span>
             </li>
            </ul>
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.n-sign-posn">N_SIGN_POSN</a></code></strong></td>
          </tr>

          <tr>
           <td colspan="2" style="text-align: center;">
            <em>Константы категории <strong><code><a href="string.constants.php#constant.lc-numeric">LC_NUMERIC</a></code></strong></em>
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.decimal-point">DECIMAL_POINT</a></code></strong></td>
           <td>Символ десятичной точки.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.radixchar">RADIXCHAR</a></code></strong></td>
           <td>Аналогично <strong><code><a href="string.constants.php#constant.decimal-point">DECIMAL_POINT</a></code></strong>.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.thousands-sep">THOUSANDS_SEP</a></code></strong></td>
           <td>Разделитель тысяч (групп из 3 цифр).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.thousep">THOUSEP</a></code></strong></td>
           <td>Аналогично <strong><code><a href="string.constants.php#constant.thousands-sep">THOUSANDS_SEP</a></code></strong>.</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.grouping">GROUPING</a></code></strong></td>
           <td class="empty">&nbsp;</td>
          </tr>

          <tr>
           <td colspan="2" style="text-align: center;">
            <em>Константы категории <strong><code><a href="string.constants.php#constant.lc-messages">LC_MESSAGES</a></code></strong></em>
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.yesexpr">YESEXPR</a></code></strong></td>
           <td>Регулярное выражение, при совпадении с которым строка рассматривается как положительный ответ
            (<code class="literal">&quot;yes&quot;</code>).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.noexpr">NOEXPR</a></code></strong></td>
           <td>Регулярное выражение, при совпадении с которым строка рассматривается как отрицательный ответ
            (<code class="literal">&quot;no&quot;</code>).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.yesstr">YESSTR</a></code></strong></td>
           <td>Слово &quot;да&quot; (<code class="literal">&quot;yes&quot;</code>).</td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.nostr">NOSTR</a></code></strong></td>
           <td>Слово &quot;нет&quot; (<code class="literal">&quot;no&quot;</code>).</td>
          </tr>

          <tr>
           <td colspan="2" style="text-align: center;">
            <em>Константы категории <strong><code><a href="string.constants.php#constant.lc-ctype">LC_CTYPE</a></code></strong> Category Constants</em>
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.codeset">CODESET</a></code></strong></td>
           <td>Возвращает строку с именем текущей кодировки.</td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.nl-langinfo-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция возвращает элемент в виде строки, или <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если аргумент для параметра <code class="parameter">item</code>
   передали неправильно.
  </p>
 </div>



 <div class="refsect1 examples" id="refsect1-function.nl-langinfo-examples">
  <h3 class="title">Примеры</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Пример #1 Пример использования функции <span class="function"><strong>nl_langinfo()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">nl_langinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">CODESET</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">nl_langinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">YESEXPR</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    
<div class="example-contents"><p>
 Вывод приведённого примера будет похож на:
</p></div>

    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">string(14) &quot;ANSI_X3.4-1968&quot;
string(5) &quot;^[yY]&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.nl-langinfo-notes">
  <h3 class="title">Примечания</h3>
  <blockquote class="note"><p><strong class="note">Замечание</strong>: 
<span class="simpara">
Для Windows-платформ функцию не реализовали.
</span></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.nl-langinfo-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Устанавливает региональные настройки</span></li>
    <li><span class="function"><a href="function.localeconv.php" class="function" rel="rdfs-seeAlso">localeconv()</a> - Возвращает информацию о форматировании чисел</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>