Explorar o código

[DOCUMENTATION] English:

- some manual fixes

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16952 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas %!s(int64=16) %!d(string=hai) anos
pai
achega
347e572887
Modificáronse 1 ficheiros con 187 adicións e 156 borrados
  1. 187 156
      documentation/manual/en/module_specs/Zend_Translate-Additional.xml

+ 187 - 156
documentation/manual/en/module_specs/Zend_Translate-Additional.xml

@@ -14,23 +14,23 @@
         <title>Options for adapters</title>
         <title>Options for adapters</title>
 
 
         <para>
         <para>
-            Options can be used with all adapters. Of course the options are different for all adapters.
-            You can set options when you create the adapter. Actually there is one option which is available
-            to all adapters: '<code>clear</code>' sets if translation data should be added to existing
-            one or not. Standard behaviour is to add new translation data to existing one. But the
-            translation data is only cleared for the selected language. So other languages remain
-            untouched.
+            Options can be used with all adapters. Of course the options are different for all
+            adapters. You can set options when you create the adapter. Actually there is one option
+            which is available to all adapters: '<code>clear</code>' sets if translation data
+            should be added to existing one or not. Standard behaviour is to add new translation
+            data to existing one. But the translation data is only cleared for the selected
+            language. So other languages remain untouched.
         </para>
         </para>
 
 
         <para>
         <para>
-            You can set options temporarily when using <code>addTranslation($data, $locale, array $options = array())</code>
-            as third and optional parameter. And you can use the method <code>setOptions()</code> to
-            set the options permanently.
+            You can set options temporarily when using <code>addTranslation($data, $locale, array
+            $options = array())</code> as third and optional parameter. And you can use the method
+            <code>setOptions()</code> to set the options permanently.
         </para>
         </para>
 
 
         <example id="zend.translate..additional.options.example">
         <example id="zend.translate..additional.options.example">
             <title>Using translation options</title>
             <title>Using translation options</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 // define ':' as separator for the translation source files
 // define ':' as separator for the translation source files
 $options = array('delimiter' => ':');
 $options = array('delimiter' => ':');
 $translate = new Zend_Translate(
 $translate = new Zend_Translate(
@@ -48,7 +48,8 @@ $translate->addTranslation('/path/to/new.csv', 'fr', $options);
         </example>
         </example>
 
 
         <para>
         <para>
-            Here you can find all available options for the different adapters with a description of their usage:
+            Here you can find all available options for the different adapters with a description
+            of their usage:
         </para>
         </para>
 
 
         <table id="zend.translate.additional.options.alloptions">
         <table id="zend.translate.additional.options.alloptions">
@@ -67,41 +68,44 @@ $translate->addTranslation('/path/to/new.csv', 'fr', $options);
                         <entry>clear</entry>
                         <entry>clear</entry>
                         <entry>all</entry>
                         <entry>all</entry>
                         <entry>
                         <entry>
-                            If set to true, the already read translations will be cleared. This can be used
-                            instead of creating a new instance when reading new translation data
+                            If set to true, the already read translations will be cleared. This can
+                            be used instead of creating a new instance when reading new translation
+                            data
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">false</emphasis></entry>
+                        <entry><emphasis>false</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>disableNotices</entry>
                         <entry>disableNotices</entry>
                         <entry>all</entry>
                         <entry>all</entry>
                         <entry>
                         <entry>
-                            If set to true, all notices regarding not available translations will be
-                            disabled. You should set this option to true in production environment
+                            If set to true, all notices regarding not available translations will
+                            be disabled. You should set this option to true in production
+                            environment
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">false</emphasis></entry>
+                        <entry><emphasis>false</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>ignore</entry>
                         <entry>ignore</entry>
                         <entry>all</entry>
                         <entry>all</entry>
                         <entry>
                         <entry>
-                            All directories and files beginning with this prefix will be ignored when
-                            searching for files. This value defaults to <emphasis role="strong">'.'</emphasis>
-                            which leads to the behavior that all hidden files will be ignored. Setting this
-                            value to <code>'tmp'</code> would mean that directories and files like
-                            <code>'tmpImages'</code> and <code>'tmpFiles'</code>
-                            would be ignored as well as all subsequent directories
+                            All directories and files beginning with this prefix will be ignored
+                            when searching for files. This value defaults to
+                            <emphasis>'.'</emphasis> which leads to the behavior that all hidden
+                            files will be ignored. Setting this value to <code>'tmp'</code> would
+                            mean that directories and files like <code>'tmpImages'</code> and
+                            <code>'tmpFiles'</code> would be ignored as well as all subsequent
+                            directories
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">.</emphasis></entry>
+                        <entry><emphasis>.</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>log</entry>
                         <entry>log</entry>
                         <entry>all</entry>
                         <entry>all</entry>
                         <entry>
                         <entry>
-                            An instance of <classname>Zend_Log</classname> where untranslated messages and notices will be
-                            written to
+                            An instance of <classname>Zend_Log</classname> where untranslated
+                            messages and notices will be written to
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">null</emphasis></entry>
+                        <entry><emphasis>null</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>logMessage</entry>
                         <entry>logMessage</entry>
@@ -109,7 +113,9 @@ $translate->addTranslation('/path/to/new.csv', 'fr', $options);
                         <entry>
                         <entry>
                             The message which will be written into the log
                             The message which will be written into the log
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">Untranslated message within '%locale%': %message%</emphasis></entry>
+                        <entry>
+                            <emphasis>Untranslated message within '%locale%': %message%</emphasis>
+                        </entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>logUntranslated</entry>
                         <entry>logUntranslated</entry>
@@ -118,54 +124,64 @@ $translate->addTranslation('/path/to/new.csv', 'fr', $options);
                             When this option is set to true, all message IDs which can not be
                             When this option is set to true, all message IDs which can not be
                             translated will be written into the attached log
                             translated will be written into the attached log
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">false</emphasis></entry>
+                        <entry><emphasis>false</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>scan</entry>
                         <entry>scan</entry>
                         <entry>all</entry>
                         <entry>all</entry>
                         <entry>
                         <entry>
                             If set to null, no scanning of the directory structure will be done.
                             If set to null, no scanning of the directory structure will be done.
-                            If set to <classname>Zend_Translate::LOCALE_DIRECTORY</classname> the locale will be detected within the
-                            directory. If set to <classname>Zend_Translate::LOCALE_FILENAME</classname> the locale will be detected
-                            within the filename. See <xref linkend="zend.translate.additional.detection" />
-                            for details
+                            If set to <classname>Zend_Translate::LOCALE_DIRECTORY</classname> the
+                            locale will be detected within the directory. If set to
+                            <classname>Zend_Translate::LOCALE_FILENAME</classname> the locale will
+                            be detected within the filename. See <xref
+                                linkend="zend.translate.additional.detection" /> for details
                         </entry>
                         </entry>
-                        <entry><emphasis role="strong">null</emphasis></entry>
+                        <entry><emphasis>null</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>delimiter</entry>
                         <entry>delimiter</entry>
                         <entry>Csv</entry>
                         <entry>Csv</entry>
-                        <entry>Defines which sign is used as delimiter for separating source and translation</entry>
-                        <entry><emphasis role="strong">;</emphasis></entry>
+                        <entry>
+                            Defines which sign is used as delimiter for separating source and
+                            translation
+                        </entry>
+                        <entry><emphasis>;</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>enclosure</entry>
                         <entry>enclosure</entry>
                         <entry>Csv</entry>
                         <entry>Csv</entry>
-                        <entry>Defines the enclosure character to be used. Defaults to a doublequote</entry>
-                        <entry><emphasis role="strong">"</emphasis></entry>
+                        <entry>
+                            Defines the enclosure character to be used. Defaults to a doublequote
+                        </entry>
+                        <entry><emphasis>"</emphasis></entry>
                     </row>
                     </row>
                     <row>
                     <row>
                         <entry>length</entry>
                         <entry>length</entry>
                         <entry>Csv</entry>
                         <entry>Csv</entry>
-                        <entry>Defines the maximum length of a csv line. When set to 0 it will be detected automatically</entry>
-                        <entry><emphasis role="strong">0</emphasis></entry>
+                        <entry>
+                            Defines the maximum length of a csv line. When set to 0 it will be
+                            detected automatically
+                        </entry>
+                        <entry><emphasis>0</emphasis></entry>
                     </row>
                     </row>
                 </tbody>
                 </tbody>
             </tgroup>
             </tgroup>
         </table>
         </table>
 
 
         <para>
         <para>
-            When you want to have self defined options, you are also able to use them within all adapters.
-            The <code>setOptions()</code> method can be used to define your option. <code>setOptions()</code>
-            needs an array with the options you want to set. If an given option exists it will be signed over.
-            You can define as much options as needed as they will not be checked by the adapter. Just make sure
-            not to overwrite any existing option which is used by an adapter.
+            When you want to have self defined options, you are also able to use them within all
+            adapters. The <code>setOptions()</code> method can be used to define your option.
+            <code>setOptions()</code> needs an array with the options you want to set. If an given
+            option exists it will be signed over. You can define as much options as needed as they
+            will not be checked by the adapter. Just make sure not to overwrite any existing option
+            which is used by an adapter.
         </para>
         </para>
 
 
         <para>
         <para>
-            To return the option you can use the <code>getOptions()</code> method. When <code>getOptions()</code>
-            is called without a parameter it will return all options set. When the optional parameter is given
-            you will only get the specified option.
+            To return the option you can use the <code>getOptions()</code> method. When
+            <code>getOptions()</code> is called without a parameter it will return all options set.
+            When the optional parameter is given you will only get the specified option.
         </para>
         </para>
 
 
     </sect2>
     </sect2>
@@ -179,32 +195,34 @@ $translate->addTranslation('/path/to/new.csv', 'fr', $options);
         </para>
         </para>
 
 
         <para>
         <para>
-            The <code>getLocale()</code> method can be used to get the currently set language. It can either hold
-            an instance of <classname>Zend_Locale</classname> or the identifier of a locale.
+            The <code>getLocale()</code> method can be used to get the currently set language. It
+            can either hold an instance of <classname>Zend_Locale</classname> or the identifier of
+            a locale.
         </para>
         </para>
 
 
         <para>
         <para>
-            The <code>setLocale()</code> method sets a new standard language for translation. This prevents the
-            need of setting the optional language parameter more than once to the <code>translate()</code> method.
-            If the given language does not exist, or no translation data is available for the language,
-            <code>setLocale()</code> tries to downgrade to the language without the region if any was given.
-            A language of <code>en_US</code> would be downgraded to <code>en</code>. When even the downgraded
+            The <code>setLocale()</code> method sets a new standard language for translation. This
+            prevents the need of setting the optional language parameter more than once to the
+            <code>translate()</code> method. If the given language does not exist, or no
+            translation data is available for the language, <code>setLocale()</code> tries to
+            downgrade to the language without the region if any was given. A language of
+            <code>en_US</code> would be downgraded to <code>en</code>. When even the downgraded
             language can not be found an exception will be thrown.
             language can not be found an exception will be thrown.
         </para>
         </para>
 
 
         <para>
         <para>
-            The <code>isAvailable()</code> method checks if a given language is already available. It returns
-            <code>true</code> if data for the given language exist.
+            The <code>isAvailable()</code> method checks if a given language is already available.
+            It returns <code>true</code> if data for the given language exist.
         </para>
         </para>
 
 
         <para>
         <para>
-            And finally the <code>getList()</code> method can be used to get all currently set languages for an adapter
-            returned as array.
+            And finally the <code>getList()</code> method can be used to get all currently set
+            languages for an adapter returned as array.
         </para>
         </para>
 
 
         <example id="zend.translate.additional.languages.example">
         <example id="zend.translate.additional.languages.example">
             <title>Handling languages with adapters</title>
             <title>Handling languages with adapters</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 // returns the currently set language
 // returns the currently set language
 $actual = $translate->getLocale();
 $actual = $translate->getLocale();
 
 
@@ -230,21 +248,22 @@ if ($translate->isAvailable("fr")) {
             <title>Automatical handling of languages</title>
             <title>Automatical handling of languages</title>
 
 
             <para>
             <para>
-                Note that as long as you only add new translation sources with the <code>addTranslation()</code>
-                method <classname>Zend_Translate</classname> will automatically set the best fitting language for your
-                environment when you use one of the automatic locales which are '<code>auto</code>' or '<code>browser</code>'. So
-                normally you will not need to call <code>setLocale()</code>. This should only be used in
-                conjunction with automatic source detection.
+                Note that as long as you only add new translation sources with the
+                <code>addTranslation()</code> method <classname>Zend_Translate</classname> will
+                automatically set the best fitting language for your environment when you use one
+                of the automatic locales which are '<code>auto</code>' or '<code>browser</code>'.
+                So normally you will not need to call <code>setLocale()</code>. This should only be
+                used in conjunction with automatic source detection.
             </para>
             </para>
 
 
             <para>
             <para>
-                The algorithm will search for the best fitting locale depending on the user's browser and
-                your environment. See the following example for details:
+                The algorithm will search for the best fitting locale depending on the user's
+                browser and your environment. See the following example for details:
             </para>
             </para>
 
 
             <example id="zend.translate.additional.languages.automatic.example">
             <example id="zend.translate.additional.languages.automatic.example">
                 <title>Automatically language detection</title>
                 <title>Automatically language detection</title>
-                <programlisting role="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 // Let's expect the browser returns these language settings:
 // Let's expect the browser returns these language settings:
 // HTTP_ACCEPT_LANGUAGE = "de_AT=1;fr=1;en_US=0.8";
 // HTTP_ACCEPT_LANGUAGE = "de_AT=1;fr=1;en_US=0.8";
 
 
@@ -286,24 +305,25 @@ $translate->setLocale('it_IT');
             </example>
             </example>
 
 
             <para>
             <para>
-                After setting a language manually with the <code>setLocale()</code> method the automatic
-                detection will be switched off and overridden.
+                After setting a language manually with the <code>setLocale()</code> method the
+                automatic detection will be switched off and overridden.
             </para>
             </para>
 
 
             <para>
             <para>
                 If you want to use it again, you can set the language
                 If you want to use it again, you can set the language
-                <emphasis role="strong">auto</emphasis> with <code>setLocale()</code> which will reactivate
+                <emphasis>auto</emphasis> with <code>setLocale()</code> which will reactivate
                 the automatic detection for <classname>Zend_Translate</classname>.
                 the automatic detection for <classname>Zend_Translate</classname>.
             </para>
             </para>
 
 
             <para>
             <para>
-                Since Zend Framework 1.7.0 <classname>Zend_Translate</classname> also recognises an application
-                wide locale. You can simply set a <classname>Zend_Locale</classname> instance to the registry like shown
-                below. With this notation you can forget about setting the locale manually with each instance
-                when you want to use the same locale multiple times.
+                Since Zend Framework 1.7.0 <classname>Zend_Translate</classname> also recognises an
+                application wide locale. You can simply set a <classname>Zend_Locale</classname>
+                instance to the registry like shown below. With this notation you can forget about
+                setting the locale manually with each instance when you want to use the same locale
+                multiple times.
             </para>
             </para>
 
 
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 // in your bootstrap file
 // in your bootstrap file
 $locale = new Zend_Locale();
 $locale = new Zend_Locale();
 Zend_Registry::set('Zend_Locale', $locale);
 Zend_Registry::set('Zend_Locale', $locale);
@@ -331,9 +351,10 @@ $translate->getLocale();
         <title>Automatic source detection</title>
         <title>Automatic source detection</title>
 
 
         <para>
         <para>
-            <classname>Zend_Translate</classname> can detect translation sources automatically. So you don't have
-            to declare each source file manually. You can let <classname>Zend_Translate</classname> do this job and
-            scan the complete directory structure for source files.
+            <classname>Zend_Translate</classname> can detect translation sources automatically. So
+            you don't have to declare each source file manually. You can let
+            <classname>Zend_Translate</classname> do this job and scan the complete directory
+            structure for source files.
         </para>
         </para>
 
 
         <note>
         <note>
@@ -343,13 +364,13 @@ $translate->getLocale();
         </note>
         </note>
 
 
         <para>
         <para>
-            The usage is quite the same as initiating a single translation source with one difference.
-            You must give a directory which has to be scanned instead a file.
+            The usage is quite the same as initiating a single translation source with one
+            difference. You must give a directory which has to be scanned instead a file.
         </para>
         </para>
 
 
         <example id="zend.translate.additional.languages.directory.example">
         <example id="zend.translate.additional.languages.directory.example">
             <title>Scanning a directory structure for sources</title>
             <title>Scanning a directory structure for sources</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 // assuming we have the following structure
 // assuming we have the following structure
 //  /language/
 //  /language/
 //  /language/login/login.tmx
 //  /language/login/login.tmx
@@ -362,25 +383,27 @@ $translate = new Zend_Translate('tmx', '/language');
         </example>
         </example>
 
 
         <para>
         <para>
-            So <classname>Zend_Translate</classname> does not only search the given directory, but also all subdirectories for
-            translation source files. This makes the usage quite simple. But <classname>Zend_Translate</classname> will ignore all
-            files which are not sources or which produce failures while reading the translation data. So you
-            have to make sure that all of your translation sources are correct and readable because you will
-            not get any failure if a file is bogus or can not be read.
+            So <classname>Zend_Translate</classname> does not only search the given directory, but
+            also all subdirectories for translation source files. This makes the usage quite
+            simple. But <classname>Zend_Translate</classname> will ignore all files which are not
+            sources or which produce failures while reading the translation data. So you have to
+            make sure that all of your translation sources are correct and readable because you
+            will not get any failure if a file is bogus or can not be read.
         </para>
         </para>
 
 
         <note>
         <note>
             <para>
             <para>
-                Depending on how deep your directory structure is and how much files are within this structure
-                it can take a long time for <classname>Zend_Translate</classname> to complete.
+                Depending on how deep your directory structure is and how much files are within
+                this structure it can take a long time for <classname>Zend_Translate</classname>
+                to complete.
             </para>
             </para>
         </note>
         </note>
 
 
         <para>
         <para>
-            In our example we have used the TMX format which includes the language to be used within the
-            source. But many of the other source formats are not able to include the language within the
-            file. Even this sources can be used with automatic scanning if you do some pre-requisits as
-            described below:
+            In our example we have used the TMX format which includes the language to be used
+            within the source. But many of the other source formats are not able to include the
+            language within the file. Even this sources can be used with automatic scanning if you
+            do some pre-requisits as described below:
         </para>
         </para>
 
 
         <sect3 id="zend.translate.additional.detection.directory">
         <sect3 id="zend.translate.additional.detection.directory">
@@ -388,19 +411,20 @@ $translate = new Zend_Translate('tmx', '/language');
             <title>Language through naming directories</title>
             <title>Language through naming directories</title>
 
 
             <para>
             <para>
-                One way to include automatic language detection is to name the directories related to the
-                language which is used for the sources within this directory. This is the easiest way and
-                is used for example within standard gettext implementations.
+                One way to include automatic language detection is to name the directories related
+                to the language which is used for the sources within this directory. This is the
+                easiest way and is used for example within standard gettext implementations.
             </para>
             </para>
 
 
             <para>
             <para>
-                <classname>Zend_Translate</classname> needs the '<code>scan</code>' option to know that it should search the names of all
-                directories for languages. See the following example for details:
+                <classname>Zend_Translate</classname> needs the '<code>scan</code>' option to know
+                that it should search the names of all directories for languages. See the following
+                example for details:
             </para>
             </para>
 
 
             <example id="zend.translate.additional.detection.directory.example">
             <example id="zend.translate.additional.detection.directory.example">
                 <title>Directory scanning for languages</title>
                 <title>Directory scanning for languages</title>
-                <programlisting role="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 // assuming we have the following structure
 // assuming we have the following structure
 //  /language/
 //  /language/
 //  /language/de/login/login.mo
 //  /language/de/login/login.mo
@@ -418,9 +442,10 @@ $translate = new Zend_Translate(
 
 
             <note>
             <note>
                 <para>
                 <para>
-                    This works only for adapters which do not include the language within the source file.
-                    Using this option for example with TMX will be ignored. Also language definitions within
-                    the filename will be ignored when using this option.
+                    This works only for adapters which do not include the language within the
+                    source file. Using this option for example with TMX will be ignored. Also
+                    language definitions within the filename will be ignored when using this
+                    option.
                 </para>
                 </para>
             </note>
             </note>
 
 
@@ -442,15 +467,16 @@ $translate = new Zend_Translate(
             <title>Language through filenames</title>
             <title>Language through filenames</title>
 
 
             <para>
             <para>
-                Another way to detect the language automatically is to use special filenames. You can either
-                name the complete file or parts of a file after the used language. To use this way of detection
-                you will have to set the '<code>scan</code>' option at initiation. There are several ways of naming the
-                sourcefiles which are described below:
+                Another way to detect the language automatically is to use special filenames. You
+                can either name the complete file or parts of a file after the used language. To
+                use this way of detection you will have to set the '<code>scan</code>' option at
+                initiation. There are several ways of naming the sourcefiles which are described
+                below:
             </para>
             </para>
 
 
             <example id="zend.translate.additional.detection.filename.example">
             <example id="zend.translate.additional.detection.filename.example">
                 <title>Filename scanning for languages</title>
                 <title>Filename scanning for languages</title>
-                <programlisting role="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 // assuming we have the following structure
 // assuming we have the following structure
 //  /language/
 //  /language/
 //  /language/login/login_en.mo
 //  /language/login/login_en.mo
@@ -471,8 +497,8 @@ $translate = new Zend_Translate(
                 <title>Complete filename</title>
                 <title>Complete filename</title>
 
 
                 <para>
                 <para>
-                    Having the whole file named after the language is the simplest way but only viable
-                    if you have only one file per language.
+                    Having the whole file named after the language is the simplest way but only
+                    viable if you have only one file per language.
                 </para>
                 </para>
 
 
                 <programlisting><![CDATA[
                 <programlisting><![CDATA[
@@ -490,8 +516,8 @@ $translate = new Zend_Translate(
 
 
                 <para>
                 <para>
                     Another simple way to use the extension of the file for language detection.
                     Another simple way to use the extension of the file for language detection.
-                    But this may be confusing since you will no longer have an idea which extension the file
-                    originally had.
+                    But this may be confusing since you will no longer have an idea which extension
+                    the file originally had.
                 </para>
                 </para>
 
 
                 <programlisting><![CDATA[
                 <programlisting><![CDATA[
@@ -508,10 +534,10 @@ $translate = new Zend_Translate(
                 <title>Filename tokens</title>
                 <title>Filename tokens</title>
 
 
                 <para>
                 <para>
-                    <classname>Zend_Translate</classname> is also capable of detecting the language if it is included within the
-                    filename. But if you go this way you will have to separate the language with a token.
-                    There are three supported tokens which can be used: a dot '.', an underscore '_', or
-                    a hyphen '-'.
+                    <classname>Zend_Translate</classname> is also capable of detecting the language
+                    if it is included within the filename. But if you go this way you will have to
+                    separate the language with a token. There are three supported tokens which can
+                    be used: a dot '.', an underscore '_', or a hyphen '-'.
                 </para>
                 </para>
 
 
                 <programlisting><![CDATA[
                 <programlisting><![CDATA[
@@ -522,8 +548,8 @@ $translate = new Zend_Translate(
 ]]></programlisting>
 ]]></programlisting>
 
 
                 <para>
                 <para>
-                    The first found string delimited by a token which can be interpreted as a locale will be used. See the following
-                    example for details.
+                    The first found string delimited by a token which can be interpreted as a
+                    locale will be used. See the following example for details.
                 </para>
                 </para>
 
 
                 <programlisting><![CDATA[
                 <programlisting><![CDATA[
@@ -534,9 +560,9 @@ $translate = new Zend_Translate(
 ]]></programlisting>
 ]]></programlisting>
 
 
                 <para>
                 <para>
-                    All three tokens are used to detect the locale. When the filename contains multiple tokens,
-                    the first found token depends on the order of the tokens which are used. See the following
-                    example for details.
+                    All three tokens are used to detect the locale. When the filename contains
+                    multiple tokens, the first found token depends on the order of the tokens
+                    which are used. See the following example for details.
                 </para>
                 </para>
 
 
                 <programlisting><![CDATA[
                 <programlisting><![CDATA[
@@ -557,23 +583,24 @@ $translate = new Zend_Translate(
         <title>Checking for translations</title>
         <title>Checking for translations</title>
 
 
         <para>
         <para>
-            Normally text will be translated without any computation. But sometimes it is necessary to
-            know if a text is translated or not, therefor the <code>isTranslated()</code>
+            Normally text will be translated without any computation. But sometimes it is necessary
+            to know if a text is translated or not, therefor the <code>isTranslated()</code>
             method can be used.
             method can be used.
         </para>
         </para>
 
 
         <para>
         <para>
             <code>isTranslated($messageId, $original = false, $locale = null)</code> takes
             <code>isTranslated($messageId, $original = false, $locale = null)</code> takes
-            the text you want to check as its first parameter, and as optional third parameter the locale
-            for which you want to do the check. The optional second parameter declares whether translation
-            is fixed to the declared language or a lower set of translations can be used. If you have a text which
-            can be returned for 'en' but not for 'en_US' you will normally get the translation returned, but by
-            setting <code>$original</code> to true, <code>isTranslated()</code> will return false.
+            the text you want to check as its first parameter, and as optional third parameter the
+            locale for which you want to do the check. The optional second parameter declares
+            whether translation is fixed to the declared language or a lower set of translations
+            can be used. If you have a text which can be returned for 'en' but not for 'en_US' you
+            will normally get the translation returned, but by setting <code>$original</code> to
+            true, <code>isTranslated()</code> will return false.
         </para>
         </para>
 
 
         <example id="zend.translate.additional.istranslated.example">
         <example id="zend.translate.additional.istranslated.example">
             <title>Checking if a text is translatable</title>
             <title>Checking if a text is translatable</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $english = array(
 $english = array(
     'message1' => 'Nachricht 1',
     'message1' => 'Nachricht 1',
     'message2' => 'Nachricht 2',
     'message2' => 'Nachricht 2',
@@ -603,20 +630,20 @@ if ($translate->isTranslated('message1', false, 'de')) {
         <title>How to log not found translations</title>
         <title>How to log not found translations</title>
 
 
         <para>
         <para>
-            When you have a bigger site or you are creating the translation files manually, you often have
-            the problem that some messages are not translated. But there is an easy solution for you when you
-            are using <classname>Zend_Translate</classname>.
+            When you have a bigger site or you are creating the translation files manually, you
+            often have the problem that some messages are not translated. But there is an easy
+            solution for you when you are using <classname>Zend_Translate</classname>.
         </para>
         </para>
 
 
         <para>
         <para>
             You have to follow two or three simple steps. First, you have to create an instance of
             You have to follow two or three simple steps. First, you have to create an instance of
-            <classname>Zend_Log</classname>. Then you have to attach this instance to <classname>Zend_Translate</classname>.
-            See the following example:
+            <classname>Zend_Log</classname>. Then you have to attach this instance to
+            <classname>Zend_Translate</classname>. See the following example:
         </para>
         </para>
 
 
         <example id="zend.translate.additional.logging.example">
         <example id="zend.translate.additional.logging.example">
             <title>Log translations</title>
             <title>Log translations</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $translate = new Zend_Translate('gettext', $path, 'de');
 $translate = new Zend_Translate('gettext', $path, 'de');
 
 
 // Create a log instance
 // Create a log instance
@@ -633,34 +660,36 @@ $translate->translate('unknown string');
         </example>
         </example>
 
 
         <para>
         <para>
-            Now you will have a new notice in the log: <code>Untranslated message within 'de': unknown string</code>.
+            Now you will have a new notice in the log: <code>Untranslated message within 'de':
+            unknown string</code>.
         </para>
         </para>
 
 
         <note>
         <note>
             <para>
             <para>
-                You should note that any translation which can not be found will be logged. This means
-                all translations when a user requests a language which is not supported. Also every request
-                for a message which can not be translated will be logged. Be aware, that 100 people
-                requesting the same translation, will result 100 logged notices.
+                You should note that any translation which can not be found will be logged. This
+                means all translations when a user requests a language which is not supported. Also
+                every request for a message which can not be translated will be logged. Be aware,
+                that 100 people requesting the same translation, will result 100 logged notices.
             </para>
             </para>
         </note>
         </note>
 
 
         <para>
         <para>
-            This feature can not only be used to log messages but also to attach this untranslated messages
-            into an empty translation file. To do so you will have to write your own log writer which
-            writes the format you want to have and strips the prepending "Untranslated message".
+            This feature can not only be used to log messages but also to attach this untranslated
+            messages into an empty translation file. To do so you will have to write your own log
+            writer which writes the format you want to have and strips the prepending "Untranslated
+            message".
         </para>
         </para>
 
 
         <para>
         <para>
-            You can also set the '<code>logMessage</code>' option when you want to have your own log message.
-            Use the '<code>%message%</code>' token for placing the messageId within your log message, and the
-            '<code>%locale%</code>' token for the requested locale. See the following example for a self
-            defined log message:
+            You can also set the '<code>logMessage</code>' option when you want to have your own
+            log message. Use the '<code>%message%</code>' token for placing the messageId within
+            your log message, and the '<code>%locale%</code>' token for the requested locale. See
+            the following example for a self defined log message:
         </para>
         </para>
 
 
         <example id="zend.translate.additional.logging.example2">
         <example id="zend.translate.additional.logging.example2">
             <title>Self defined log messages</title>
             <title>Self defined log messages</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $translate = new Zend_Translate('gettext', $path, 'de');
 $translate = new Zend_Translate('gettext', $path, 'de');
 
 
 // Create a log instance
 // Create a log instance
@@ -689,19 +718,21 @@ $translate->translate('unknown string');
         </para>
         </para>
 
 
         <para>
         <para>
-            The <code>getMessageIds($locale = null)</code> method returns all known message IDs as array.
+            The <code>getMessageIds($locale = null)</code> method returns all known message IDs as
+            array.
         </para>
         </para>
 
 
         <para>
         <para>
-            The <code>getMessages($locale = null)</code> method returns the complete translation source as
-            an array. The message ID is used as key and the translation data as value.
+            The <code>getMessages($locale = null)</code> method returns the complete translation
+            source as an array. The message ID is used as key and the translation data as value.
         </para>
         </para>
 
 
         <para>
         <para>
-            Both methods accept an optional parameter <code>$locale</code> which, if set, returns the
-            translation data for the specified language. If this parameter is not given, the actual set
-            language will be used. Keep in mind that normally all translations should be available in all
-            languages. Which means that in a normal situation you will not have to set this parameter.
+            Both methods accept an optional parameter <code>$locale</code> which, if set, returns
+            the translation data for the specified language. If this parameter is not given, the
+            actual set language will be used. Keep in mind that normally all translations should be
+            available in all languages. Which means that in a normal situation you will not have to
+            set this parameter.
         </para>
         </para>
 
 
         <para>
         <para>
@@ -712,14 +743,14 @@ $translate->translate('unknown string');
 
 
         <note>
         <note>
             <para>
             <para>
-                Attention: the returned array can be <emphasis role="strong">very big</emphasis>,
+                Attention: the returned array can be <emphasis>very big</emphasis>,
                 depending on the number of added locales and the amount of translation data.
                 depending on the number of added locales and the amount of translation data.
             </para>
             </para>
         </note>
         </note>
 
 
         <example id="zend.translate.additional.sourcedata.example">
         <example id="zend.translate.additional.sourcedata.example">
             <title>Handling languages with adapters</title>
             <title>Handling languages with adapters</title>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 // returns all known message IDs
 // returns all known message IDs
 $messageIds = $translate->getMessageIds();
 $messageIds = $translate->getMessageIds();
 print_r($messageIds);
 print_r($messageIds);