<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.gettext.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'function.gettext.php',
    1 => 'gettext',
    2 => 'Ge&ccedil;erli uygulama alanında bir iletiyi arar',
  ),
  'up' => 
  array (
    0 => 'ref.gettext.php',
    1 => 'Gettext İşlevleri',
  ),
  'prev' => 
  array (
    0 => 'function.dngettext.php',
    1 => 'dngettext',
  ),
  'next' => 
  array (
    0 => 'function.ngettext.php',
    1 => 'ngettext',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'tr',
    'path' => 'reference/gettext/functions/gettext.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gettext" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gettext</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gettext</span> &mdash; <span class="dc-title">Geçerli uygulama alanında bir iletiyi arar</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gettext-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gettext</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$ileti</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Geçerli uygulama alanında bir iletiyi arar.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gettext-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">ileti</code></dt>
     <dd>
      <p class="para">Çevrilecek ileti.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.gettext-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="para">
   Çevrilmişse çevrilmiş iletiyle, çevrilmemişse belirtilen iletiyle döner.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gettext-examples">
  <h3 class="title">Örnekler</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Örnek 1 - <span class="function"><strong>gettext()</strong></span> örneği</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Yereli Türkçe yapalım<br /></span><span style="color: #0000BB">putenv</span><span style="color: #007700">(</span><span style="color: #DD0000">'LC_ALL=tr_TR'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_ALL</span><span style="color: #007700">, </span><span style="color: #DD0000">'tr_TR'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Çevirilerin bulunduğu yeri belirtelim<br /></span><span style="color: #0000BB">bindtextdomain</span><span style="color: #007700">(</span><span style="color: #DD0000">"myPHPApp"</span><span style="color: #007700">, </span><span style="color: #DD0000">"./locale"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Uygulama adını belirtelim<br /></span><span style="color: #0000BB">textdomain</span><span style="color: #007700">(</span><span style="color: #DD0000">"myPHPApp"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Böylece çevirilerin aranacağı yer<br />// ./locale/tr_TR/LC_MESSAGES/myPHPApp.mo olarak belirlendi.<br /><br />// Bir ileti basalım<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">gettext</span><span style="color: #007700">(</span><span style="color: #DD0000">"Welcome to My PHP Application"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// gettext() için rumuz olarak _() kullanalım<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">_</span><span style="color: #007700">(</span><span style="color: #DD0000">"Have a nice day"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.gettext-notes">
  <h3 class="title">Notlar</h3>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    Bu işlev için takma ad olarak altçizgi imini (&#039;_&#039;) kullanabilirsiniz.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    Bir yereli bazı sistemlerde <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> ile atamak
    yeterli olmaz,  <span class="function"><a href="function.putenv.php" class="function">putenv()</a></span> işlevinin de kullanılması
    gerekir.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gettext-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.-.php" class="function" rel="rdfs-seeAlso">_()</a> - Takma Adı: gettext</span></li>
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Yereli ayarlar</span></li>
   </ul>
  </p>
 </div>

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