<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.application.available-resources.translate">
    <title>Zend_Application_Resource_Translate</title>

    <para>
        <classname>Zend_Application_Resource_Translate</classname> will initialize a
        <classname>Zend_Translate</classname> adapter based on the options passed to it.
    </para>

    <para>
        The following configuration keys are recognized:
    </para>

    <itemizedlist>
        <listitem>
            <para>
                <emphasis><property>adapter</property></emphasis> : <classname>Zend_Translate
                </classname> adapter type. The default adapter is array if not specified.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>data</property></emphasis> : path to translation.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>locale</property></emphasis> : defining the locale to be used
                in translation. By default, the locale can be detected automatically or forcing
                with a <classname>Zend_Locale</classname> instance store in <classname>
                Zend_Registry</classname> with a single locale.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>options</property></emphasis> : the options are different for
                each adapter. See the section <xref linkend="zend.translate.additional.options" /> for
                more details.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>registry</property></emphasis> : the custom key to store the
                <classname>Zend_Translate</classname> instance in the registry. By default, the
                key is <property>Zend_Translate</property>.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>cache</property></emphasis> : the name of the cache template
                or an instance of <classname>Zend_Cache_Core</classname> to use as cache for
                <classname>Zend_Translate_Adapter</classname>. The goal is to accelerate the
                loading specialy for the <acronym>XML</acronym> based files.
            </para>
        </listitem>
    </itemizedlist>

    <example id="zend.application.available-resources.translate.configExample">
        <title>Sample translate adapter resource configuration</title>

        <para>
            Below is an example <acronym>INI</acronym> configuration that can be used to initialize
            the translate resource.
        </para>

        <programlisting language="ini"><![CDATA[
resources.translate.adapter = tmx
resources.translate.content = APPLICATION_PATH "/../data/locales"
resources.translate.scan = Zend_Translate::LOCALE_DIRECTORY

; Optionally you can also the cache template to use for caching:
resources.translate.cache = "languages"
]]></programlisting>
    </example>
</sect2>
