mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 13:51:36 +01:00
- updates for new build system - added missing files - corrections from users - revcheck comments for all files - big up to didou and nuno, brilliant work - make test: ok - make: ok
253 lines
7.0 KiB
XML
253 lines
7.0 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 1.1 Maintainer: andreas Status: ready -->
|
|
<sect1 id="language.function.textformat">
|
|
<title>textformat (Textformatierung)</title>
|
|
<informaltable frame="all">
|
|
<tgroup cols="5">
|
|
<colspec colname="param" align="center" />
|
|
<colspec colname="type" align="center" />
|
|
<colspec colname="required" align="center" />
|
|
<colspec colname="default" align="center" />
|
|
<colspec colname="desc" />
|
|
<thead>
|
|
<row>
|
|
<entry>Attribut Name</entry>
|
|
<entry>Typ</entry>
|
|
<entry>Erforderlich</entry>
|
|
<entry>Standardwert</entry>
|
|
<entry>Beschreibung</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>style</entry>
|
|
<entry>string</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
<entry>aktueller Stil</entry>
|
|
</row>
|
|
<row>
|
|
<entry>indent</entry>
|
|
<entry>number</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>0</emphasis></entry>
|
|
<entry>Anzahl Zeichen die für das einrücken von Zeilen verwendet werden.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>indent_first</entry>
|
|
<entry>number</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>0</emphasis></entry>
|
|
<entry>Anzahl Zeichen die für das Einrücken der ersten Zeile verwendet werden.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>indent_char</entry>
|
|
<entry>string</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>(single space)</emphasis></entry>
|
|
<entry>Das Zeichen welches zum Einrücken verwendet werden soll.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>wrap</entry>
|
|
<entry>number</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>80</emphasis></entry>
|
|
<entry>Maximale Zeilenlänge bevor die Zeile umgebrochen wird.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>wrap_char</entry>
|
|
<entry>string</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>\n</emphasis></entry>
|
|
<entry>Das für Zeilenumbrüche zu verwendende Zeichen.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>wrap_cut</entry>
|
|
<entry>boolean</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>false</emphasis></entry>
|
|
<entry>Wenn auf 'true' gesetzt, wird die Zeile an der definierten Position abgeschnitten.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>assign</entry>
|
|
<entry>string</entry>
|
|
<entry>Nein</entry>
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
<entry>Die Template-Variable welcher die Ausgabe zugewiesen werden soll.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
<para>
|
|
'textformat' ist eine Funktion um Text zu formatieren. Die Funktion
|
|
entfernt überflüssige Leerzeichen und formatiert Paragrafen
|
|
indem sie die Zeilen einrückt und umbricht.
|
|
</para>
|
|
<para>
|
|
Sie können entweder den aktuellen Stil verwenden, oder ihn anhand
|
|
der Parameter selber definieren. Im Moment ist 'email' der einzig verfügbare Stil.
|
|
</para>
|
|
<example>
|
|
<title>textformat (Text Formatierung)</title>
|
|
<programlisting>
|
|
{textformat wrap=40}
|
|
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
|
|
{/textformat}
|
|
|
|
AUSGABE:
|
|
|
|
This is foo. This is foo. This is foo.
|
|
This is foo. This is foo. This is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo. bar foo bar foo
|
|
foo. bar foo bar foo foo. bar foo bar
|
|
foo foo. bar foo bar foo foo. bar foo
|
|
bar foo foo. bar foo bar foo foo.
|
|
|
|
|
|
{textformat wrap=40 indent=4}
|
|
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
|
|
{/textformat}
|
|
|
|
AUSGABE:
|
|
|
|
This is foo. This is foo. This is
|
|
foo. This is foo. This is foo. This
|
|
is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo. bar foo bar foo
|
|
foo. bar foo bar foo foo. bar foo
|
|
bar foo foo. bar foo bar foo foo.
|
|
bar foo bar foo foo. bar foo bar
|
|
foo foo.
|
|
|
|
{textformat wrap=40 indent=4 indent_first=4}
|
|
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
|
|
{/textformat}
|
|
|
|
AUSGABE:
|
|
|
|
This is foo. This is foo. This
|
|
is foo. This is foo. This is foo.
|
|
This is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo. bar foo bar
|
|
foo foo. bar foo bar foo foo. bar
|
|
foo bar foo foo. bar foo bar foo
|
|
foo. bar foo bar foo foo. bar foo
|
|
bar foo foo.
|
|
|
|
{textformat style="email"}
|
|
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
This is foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
bar foo bar foo foo.
|
|
|
|
{/textformat}
|
|
|
|
AUSGABE:
|
|
|
|
This is foo. This is foo. This is foo. This is foo. This is foo. This is
|
|
foo.
|
|
|
|
This is bar.
|
|
|
|
bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo
|
|
bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo
|
|
foo.
|
|
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|