mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-10 17:21:36 +01:00
added Japanese translation files.
This commit is contained in:
99
docs/ja/programmers/plugins/plugins-naming-conventions.xml
Normal file
99
docs/ja/programmers/plugins/plugins-naming-conventions.xml
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="plugins.naming.conventions">
|
||||
<title>命名規約</title>
|
||||
<para>
|
||||
プラグインファイルとその関数が Smarty
|
||||
によって認識されるためには特有の命名規約に従わなければなりません。
|
||||
</para>
|
||||
<para>
|
||||
<emphasis role="bold">プラグインファイル</emphasis> は次のように指定します。
|
||||
<blockquote>
|
||||
<para>
|
||||
<filename>
|
||||
<replaceable>type</replaceable>.<replaceable>name</replaceable>.php
|
||||
</filename>
|
||||
</para>
|
||||
</blockquote>
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<literal>type</literal> は次のプラグインタイプのうちのいずれか1つです。
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem><simpara>function</simpara></listitem>
|
||||
<listitem><simpara>modifier</simpara></listitem>
|
||||
<listitem><simpara>block</simpara></listitem>
|
||||
<listitem><simpara>compiler</simpara></listitem>
|
||||
<listitem><simpara>prefilter</simpara></listitem>
|
||||
<listitem><simpara>postfilter</simpara></listitem>
|
||||
<listitem><simpara>outputfilter</simpara></listitem>
|
||||
<listitem><simpara>resource</simpara></listitem>
|
||||
<listitem><simpara>insert</simpara></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>
|
||||
<literal>name</literal> には英数字とアンダースコアのみ使用できます。
|
||||
<ulink url="&url.php-manual;language.variables">PHP の変数</ulink>
|
||||
を参照してください。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
例: <filename>function.html_select_date.php</filename>、
|
||||
<filename>resource.db.php</filename>、
|
||||
<filename>modifier.spacify.php</filename>。
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
||||
<para>
|
||||
PHP ファイル内で定義する <emphasis role="bold">プラグイン関数</emphasis>
|
||||
は次のように指定します。
|
||||
<blockquote>
|
||||
<para>
|
||||
<function>smarty_<replaceable>type</replaceable>_<replaceable>name</replaceable></function>
|
||||
</para>
|
||||
</blockquote>
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<literal>type</literal> および <literal>name</literal>
|
||||
の意味は前述したものと同じです。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
たとえば <varname>foo</varname> という名前の修飾子の場合は、
|
||||
<literal>function smarty_modifier_foo()</literal> となります。
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
必要なプラグインファイルが見当たらないか、
|
||||
ファイル名又はプラグイン関数名が不正な場合 Smarty は適切なエラーメッセージを出力します。
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
Reference in New Issue
Block a user