luk Thu Apr 25 17:58:14 2002 EDT Modified files: /phpdoc/cs language-defs.ent language-snippets.ent translation.xml /phpdoc/cs/language control-structures.xml operators.xml Log: Synced to the English version.
Index: phpdoc/cs/language-defs.ent diff -u phpdoc/cs/language-defs.ent:1.7 phpdoc/cs/language-defs.ent:1.8 --- phpdoc/cs/language-defs.ent:1.7 Thu Mar 7 18:25:02 2002 +++ phpdoc/cs/language-defs.ent Thu Apr 25 17:58:12 2002 @@ -1,5 +1,5 @@ <?xml encoding="iso-8859-2"?> -<!-- EN-Revision: 1.11 Maintainer: luk Status: ready --> +<!-- EN-Revision: 1.12 Maintainer: luk Status: ready --> <!ENTITY PHPManual "Manuál PHP"> <!ENTITY Date "Datum:"> @@ -9,8 +9,9 @@ <!ENTITY Features "Vlastnosti"> <!ENTITY FunctionReference "Reference funkcí"> <!ENTITY Appendixes "Dodatky"> -<!ENTITY PEAR "PEAR: the PHP Extension and Application Repository"> -<!ENTITY FAQ "FAQ: Frequently Asked Questions"> +<!ENTITY PEAR "PEAR: Repozitář rozšíření a aplikací PHP"> +<!ENTITY FAQ "FAQ: Často zodpovídané otázky"> <!ENTITY FAQabbrev "FAQ"> -<!ENTITY FunctionIndex "Function Index"> -<!ENTITY CHMEdition "HTML Help Edition"> +<!ENTITY FunctionIndex "Rejstřík funkcí"> +<!ENTITY CHMEdition "Vydání HTML Help"> +<!ENTITY ReservedConstants "Předdefinované konstanty"> Index: phpdoc/cs/language-snippets.ent diff -u phpdoc/cs/language-snippets.ent:1.12 phpdoc/cs/language-snippets.ent:1.13 --- phpdoc/cs/language-snippets.ent:1.12 Sun Apr 14 15:35:23 2002 +++ phpdoc/cs/language-snippets.ent Thu Apr 25 17:58:12 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-2"?> -<!-- EN-Revision: 1.22 Maintainer: luk Status: ready --> +<!-- EN-Revision: 1.25 Maintainer: luk Status: ready --> <!ENTITY warn.experimental '<warning><simpara>Tento modul je <emphasis>EXPERIMENTÁLNÍ</emphasis>. To znamená, že chování těchto funkcí a @@ -36,6 +36,7 @@ <link linkend="language.operators.comparison">operátor ===</link>.</simpara></warning>'> +<!-- Various notes --> <!ENTITY note.not-bin-safe '<warning><simpara>Tato funkce není (ještě) binárně bezpečná!</simpara></warning>'> @@ -83,3 +84,26 @@ <!ENTITY no.constants '<para>Toto rozšíření nemá definovány žádné konstanty.</para>'> +<!-- Common pieces in partintro-sections --> +<!ENTITY no.requirement '<para>Tyto funkce jsou k dispozici jako součást +standardního modulu, který je vždy dostupný.</para>'> +<!ENTITY no.install '<para>K používání těchto funkcí není třeba žádná +instalace, jsou součástí jádra PHP.</para>'> + +<!-- Used in reference/$extname/constants.xml --> +<!ENTITY extension.constants '<simpara> +Tyto konstanty jsou definovány tímto rozšířením a budou k dispozici pouze +tehdy, bylo-li rozšíření zkompilováno společně s PHP nebo dynamicky zavedeno +za běhu. +</simpara>'> + +<!-- These are using in reference/$extname/reference.xml and other +supplemental files to mark section titles --> +<!ENTITY reftitle.intro '<title>Úvod</title>'> +<!ENTITY reftitle.required '<title>Požadavky</title>'> +<!ENTITY reftitle.install '<title>Instalace</title>'> +<!ENTITY reftitle.runtime '<title>Konfigurace běhu</title>'> +<!ENTITY reftitle.resources '<title>Typy prostředků</title>'> +<!ENTITY reftitle.constants '<title>Předdefinované konstanty</title>'> +<!ENTITY reftitle.examples '<title>Příklady</title>'> +<!ENTITY reftitle.seealso '<title>Viz také</title>'> Index: phpdoc/cs/translation.xml diff -u phpdoc/cs/translation.xml:1.5 phpdoc/cs/translation.xml:1.6 --- phpdoc/cs/translation.xml:1.5 Mon Mar 25 18:07:15 2002 +++ phpdoc/cs/translation.xml Thu Apr 25 17:58:12 2002 @@ -17,9 +17,7 @@ <file name="appendices/phpdevel.xml" person="luk" type="translation" /> <file name="appendices/predefined.xml" person="luk" type="translation" /> <file name="appendices/resources.xml" person="luk" type="translation" /> - <file name="functions/mysql.xml" person="costra" type="translation" /> <file name="language/control-structures.xml" person="luk" type="translation" /> - <file name="language/operators.xml" person="luk" type="translation" /> <file name="language/oop.xml" person="luk" type="translation" /> <file name="language/types.xml" person="luk" type="translation" /> <file name="language/variables.xml" person="luk" type="translation" /> Index: phpdoc/cs/language/control-structures.xml diff -u phpdoc/cs/language/control-structures.xml:1.3 phpdoc/cs/language/control-structures.xml:1.4 --- phpdoc/cs/language/control-structures.xml:1.3 Thu Apr 4 14:55:40 2002 +++ phpdoc/cs/language/control-structures.xml Thu Apr 25 17:58:13 2002 @@ -638,21 +638,19 @@ <sect1 id="control-structures.continue"> <title><literal>continue</literal></title> <simpara> - <literal>continue</literal> is used within looping structures to - skip the rest of the current loop iteration and continue execution - at the beginning of the next iteration. + <literal>continue</literal> se používá uvnitř cyklů k přeskočení zbytku + aktuální iterace a bezprostřednímu přechodu na následující iteraci. </simpara> <simpara> - <literal>continue</literal> accepts an optional numeric argument - which tells it how many levels of enclosing loops it should skip - to the end of. + <literal>continue</literal> akceptuje nepovinný číselný argument, který + říká, kolik úrovní cyklů se má naráz dokončit. </simpara> <para> <informalexample> <programlisting role="php"> <![CDATA[ while (list ($key, $value) = each ($arr)) { - if (!($key % 2)) { // skip odd members + if (!($key % 2)) { // přeskoč sudé členy continue; } do_something_odd ($value); @@ -660,16 +658,16 @@ $i = 0; while ($i++ < 5) { - echo "Outer<br>\n"; + echo "Vnější<br>\n"; while (1) { - echo " Middle<br>\n"; + echo " Střední<br>\n"; while (1) { - echo " Inner<br>\n"; + echo " Vnitřní<br>\n"; continue 3; } - echo "This never gets output.<br>\n"; + echo "Toto se nikdy nevytiskne.<br>\n"; } - echo "Neither does this.<br>\n"; + echo "Ani tohle se neprovádí.<br>\n"; } ]]> </programlisting> @@ -680,40 +678,38 @@ <sect1 id="control-structures.switch"> <title><literal>switch</literal></title> <simpara> - The <literal>switch</literal> statement is similar to a series of - IF statements on the same expression. In many occasions, you may - want to compare the same variable (or expression) with many - different values, and execute a different piece of code depending - on which value it equals to. This is exactly what the - <literal>switch</literal> statement is for. + Konstrukt <literal>switch</literal> je podobná sérii konstruktů IF, + testujících tentýž výraz. V mnoha případech můžete chtít porovnávat + stejnou proměnnou (nebo výraz) s mnoha různými hodnotami a provádět + různé kusy kódu v závislosti na tom, které hodnotě se rovná. + To je přesně to, k čemu je <literal>switch</literal>. </simpara> <para> - The following two examples are two different ways to write the - same thing, one using a series of <literal>if</literal> - statements, and the other using the <literal>switch</literal> - statement: + Následující dva příklady představují dva odlišné způsoby, jak napsat + totéž; jeden používá sérii podmínek <literal>if</literal>, zatímco + druhý je založen na konstruktu <literal>switch</literal>: <informalexample> <programlisting role="php"> <![CDATA[ if ($i == 0) { - print "i equals 0"; + print "i se rovná 0"; } if ($i == 1) { - print "i equals 1"; + print "i se rovná 1"; } if ($i == 2) { - print "i equals 2"; + print "i se rovná 2"; } switch ($i) { case 0: - print "i equals 0"; + print "i se rovná 0"; break; case 1: - print "i equals 1"; + print "i se rovná 1"; break; case 2: - print "i equals 2"; + print "i se rovná 2"; break; } ]]> @@ -721,54 +717,49 @@ </informalexample> </para> <para> - It is important to understand how the <literal>switch</literal> - statement is executed in order to avoid mistakes. The - <literal>switch</literal> statement executes line by line - (actually, statement by statement). In the beginning, no code is - executed. Only when a <literal>case</literal> statement is found - with a value that matches the value of the - <literal>switch</literal> expression does PHP begin to execute the - statements. PHP continues to execute the statements until the end - of the <literal>switch</literal> block, or the first time it sees - a <literal>break</literal> statement. If you don't write a - <literal>break</literal> statement at the end of a case's - statement list, PHP will go on executing the statements of the - following case. For example: + Je důležité pochopit, jak se konstrukt <literal>switch</literal> + provádí, aby se zabránilo chybám. Konstrukt <literal>switch</literal> + provádí řádek po řádku (resp. konstrukt po konstruktu). Na začátku + není proveden žádný kód. Pouze tehdy, když se najde <literal>case</literal> + s hodnotou odpovídající hodnotě výrazu u <literal>switch</literal>, + začne PHP provádět následující konstrukty. Vykonávání kódu pokračuje, + dokud se nedosáhne konce bloku <literal>switch</literal> nebo prvního + příkazu <literal>break</literal>. Pokud nenapíšete na konec bloku po + <literal>case</literal> příkaz <literal>break</literal>, bude PHP + pokračovat v provádění dalších konstruktů (po dalším + <literal>case</literal>). Například: <informalexample> <programlisting role="php"> <![CDATA[ switch ($i) { case 0: - print "i equals 0"; + print "i se rovná 0"; case 1: - print "i equals 1"; + print "i se rovná 1"; case 2: - print "i equals 2"; + print "i se rovná 2"; } ]]> </programlisting> </informalexample> </para> <simpara> - Here, if $i equals to 0, PHP would execute all of the print - statements! If $i equals to 1, PHP would execute the last two - print statements, and only if $i equals to 2, you'd get the - 'expected' behavior and only 'i equals 2' would be displayed. So, - it's important not to forget <literal>break</literal> statements - (even though you may want to avoid supplying them on purpose under - certain circumstances). + Zde, pokud se $i rovná 0, se budou provádět všechny příkazy "print"! + Pokud se $i rovná 1, PHP provede poslední dva příkazy, a pouze rovná-li se + $i číslu 2, obdržíte "očekávané" chování a zobrazí se pouze "i se rovná 2". + Takže je důležité nezapomenout na příkaz <literal>break</literal> (kromě + případu, kdy ho chcete vynechat záměrně k dosažení určitého cíle). </simpara> <simpara> - In a <literal>switch</literal> statement, the condition is - evaluated only once and the result is compared to each - <literal>case</literal> statement. In an <literal>elseif</literal> - statement, the condition is evaluated again. If your condition is - more complicated than a simple compare and/or is in a tight loop, - a <literal>switch</literal> may be faster. + V konstruktu <literal>switch</literal> se podmínka testuje pouze jednou + a výsledek se porovnává s každou hodnotou v <literal>case</literal>. + V případě <literal>elseif</literal> se podmínka pokaždé testuje znovu. + Pokud je vaše podmínka komplikovanější než jednoduché porovnání a/nebo + je uvnitř cyklu, <literal>switch</literal> může být rychlejší. </simpara> <para> - The statement list for a case can also be empty, which simply - passes control into the statement list for the next case. + Seznam konstruktů za <literal>case</literal> může být také prázdný, což + jednoduše předá řízení následujícímu <literal>case</literal>. <informalexample> <programlisting role="php"> <![CDATA[ @@ -776,65 +767,64 @@ case 0: case 1: case 2: - print "i is less than 3 but not negative"; + print "i je menší než 3, ale nezáporné"; break; case 3: - print "i is 3"; + print "i je 3"; } ]]> </programlisting> </informalexample> </para> <para> - A special case is the default case. This case matches anything - that wasn't matched by the other cases, and should be the last - <literal>case</literal> statement. For example: + Speciální <literal>case</literal> je "default". Vyhovuje všem ostatním + hodnotám, které nejsou pokryty některým z ostatních + <literal>case</literal> a má být vždy jako poslední. Například: <informalexample> <programlisting role="php"> <![CDATA[ switch ($i) { case 0: - print "i equals 0"; + print "i se rovná 0"; break; case 1: - print "i equals 1"; + print "i se rovná 1"; break; case 2: - print "i equals 2"; + print "i se rovná 2"; break; default: - print "i is not equal to 0, 1 or 2"; + print "i se nerovná 0, 1 ani 2"; } ]]> </programlisting> </informalexample> </para> <para> - The <literal>case</literal> expression may be any expression that - evaluates to a simple type, that is, integer or floating-point - numbers and strings. Arrays or objects cannot be used here unless - they are dereferenced to a simple type. + Výraz v <literal>case</literal> může být libovolný výraz, jehož hodnota + je jednoduchého typu, tj. celé nebo reálné číslo nebo řetězec. Pole ani + objekty nelze použít, ledaže by odkazovaly na jednoduchý typ. </para> <para> - The alternative syntax for control structures is supported with - switches. For more information, see <link - linkend="control-structures.alternative-syntax">Alternative syntax - for control structures</link> . + Alternativní syntaxe pro konstrukty <literal>switch</literal> je + podporována. Pro víc informací viz + <link linkend="control-structures.alternative-syntax">Alternativní syntaxe + řídicích struktur</link> . <informalexample> <programlisting role="php"> <![CDATA[ switch ($i): case 0: - print "i equals 0"; + print "i se rovná 0"; break; case 1: - print "i equals 1"; + print "i se rovná 1"; break; case 2: - print "i equals 2"; + print "i se rovná 2"; break; default: - print "i is not equal to 0, 1 or 2"; + print "i se nerovná 0, 1 ani 2"; endswitch; ]]> </programlisting> @@ -845,10 +835,9 @@ <sect1 id="control-structures.declare"> <title><literal>declare</literal></title> <para> - The <literal>declare</literal> construct is used to - set execution directives for a block of code. - The syntax of <literal>declare</literal> is similar to - the syntax of other flow control constructs: + Konstrukt <literal>declare</literal> se používá k nastavení prováděcích + direktiv pro blok kódu. Syntaxe <literal>declare</literal> je podobná + syntaxi ostatnícj konstruktů pro řízení toku: <informalexample> <programlisting> <![CDATA[ @@ -858,14 +847,11 @@ </informalexample> </para> <para> - The <literal>directive</literal> section allows the - behavior of the <literal>declare</literal> block to - be set. - Currently only one directive is recognized: the - <literal>ticks</literal> directive. (See below for more - information on the - <link linkend="control-structures.declare.ticks">ticks</link> - directive) + Část <literal>directive</literal> umožňuje nastavit chování bloku, který + má být ovlivněn pomocí <literal>declare</literal>. V současnosti je + rozpoznávána pouze jediná direktiva: <literal>ticks</literal>. + (Pro více informací viz níže - direktiva + <link linkend="control-structures.declare.ticks">ticks</link>) </para> <para> The <literal>statement</literal> part of the Index: phpdoc/cs/language/operators.xml diff -u phpdoc/cs/language/operators.xml:1.4 phpdoc/cs/language/operators.xml:1.5 --- phpdoc/cs/language/operators.xml:1.4 Wed Apr 24 14:42:34 2002 +++ phpdoc/cs/language/operators.xml Thu Apr 25 17:58:13 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-2"?> -<!-- EN-Revision: 1.32 Maintainer: luk Status: mixed --> +<!-- EN-Revision: 1.32 Maintainer: luk Status: ready --> <chapter id="language.operators"> <title>Operátory</title> @@ -490,108 +490,106 @@ <sect1 id="language.operators.precedence"> <title>Priorita operátorů</title> <para> - The precedence of an operator specifies how "tightly" it binds two - expressions together. For example, in the expression <literal>1 + - 5 * 3</literal>, the answer is <literal>16</literal> and not - <literal>18</literal> because the multiplication ("*") operator - has a higher precedence than the addition ("+") operator. - Parentheses may be used to force precedence, if necessary. For - instance: <literal>(1 + 5) * 3</literal> evaluates to - <literal>18</literal>. + Priorita operátoru specifikuje, jak "těsně" váže dva výrazy mezi sebou. + Například výraz <literal>1 + 5 * 3</literal>, + výsledkem je <literal>16</literal> a nikoli <literal>18</literal>, + protože operátor násobení ("*") má vyšší prioritu než operátor sčítání + ("+"). K vynucení priority můžeme v případě potřeby použít závorky. + Kupř. <literal>(1 + 5) * 3</literal> má hodnotu <literal>18</literal>. </para> <para> - The following table lists the precedence of operators with the - lowest-precedence operators listed first. + Následující tabulka ukazuje přehled operátorů vzestupně seřazených podle + priority. <table> - <title>Operator Precedence</title> + <title>Priorita operátorů</title> <tgroup cols="2"> <thead> <row> - <entry>Associativity</entry> - <entry>Operators</entry> + <entry>Asociativita</entry> + <entry>Operátory</entry> </row> </thead> <tbody> <row> - <entry>left</entry> + <entry>levá</entry> <entry>,</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>or</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>xor</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>and</entry> </row> <row> - <entry>right</entry> + <entry>pravá</entry> <entry>print</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry> = += -= *= /= .= %= &= |= ^= ~= <<= >>= </entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>? :</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>||</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>&&</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>|</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>^</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>&</entry> </row> <row> - <entry>non-associative</entry> + <entry>bez asociativity</entry> <entry>== != === !==</entry> </row> <row> - <entry>non-associative</entry> + <entry>bez asociativity</entry> <entry>< <= > >=</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry><< >></entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>+ - .</entry> </row> <row> - <entry>left</entry> + <entry>levá</entry> <entry>* / %</entry> </row> <row> - <entry>right</entry> + <entry>pravá</entry> <entry>! ~ ++ -- (int) (double) (string) (array) (object) @</entry> </row> <row> - <entry>right</entry> + <entry>pravá</entry> <entry>[</entry> </row> <row> - <entry>non-associative</entry> + <entry>bez asociativity</entry> <entry>new</entry> </row> </tbody> @@ -601,26 +599,24 @@ </sect1> <sect1 id="language.operators.string"> - <title>String Operators</title> + <title>Řetězcové operátory</title> <simpara> - There are two string operators. The first is the concatenation - operator ('.'), which returns the concatenation of its right and - left arguments. The second is the concatenating assignment - operator ('.='), which appends the argument on the right side to - the argument on the left side. Please read <link - linkend="language.operators.assignment">Assignment - Operators</link> for more information. + Existují dva řetezcové operátory. Jedním je operátor spojení ('.'), + který vrací spojení pravého a levého argumentu. Druhým je operátor + spojujícího přiřazení ('.='), jenž připojí argument na pravé straně + k argumentu na straně levé. Pro více informací si laskavě přečtěte + <link linkend="language.operators.assignment">Operátory přiřazení</link>. </simpara> <para> <informalexample> <programlisting role="php"> <![CDATA[ -$a = "Hello "; -$b = $a . "World!"; // now $b contains "Hello World!" +$a = "Ahoj "; +$b = $a . "světe!"; // nyní $b obsahuje "Ahoj světe!" -$a = "Hello "; -$a .= "World!"; // now $a contains "Hello World!" +$a = "Ahoj "; +$a .= "světe!"; // nyní $a obsahuje "Ahoj světe!" ]]> </programlisting> </informalexample>