[2] | 1 | <refentry id="olink.lang.fallback.sequence">
|
---|
| 2 | <refmeta>
|
---|
| 3 | <refentrytitle>olink.lang.fallback.sequence</refentrytitle>
|
---|
| 4 | <refmiscinfo role="type">string</refmiscinfo>
|
---|
| 5 | </refmeta>
|
---|
| 6 | <refnamediv>
|
---|
| 7 | <refname>olink.lang.fallback.sequence</refname>
|
---|
| 8 | <refpurpose>look up translated documents if olink not found?</refpurpose>
|
---|
| 9 |
|
---|
| 10 | </refnamediv>
|
---|
| 11 | <refsynopsisdiv> <src:fragment id="olink.lang.fallback.sequence.frag">
|
---|
| 12 | <xsl:param name="olink.lang.fallback.sequence" select="''"/> </src:fragment>
|
---|
| 13 | </refsynopsisdiv>
|
---|
| 14 | <refsect1>
|
---|
| 15 | <title>Description</title>
|
---|
| 16 |
|
---|
| 17 | <para>This parameter defines a list of lang values
|
---|
| 18 | to search among to resolve olinks.
|
---|
| 19 | </para>
|
---|
| 20 |
|
---|
| 21 | <para>Normally an olink tries to resolve to a document in the same
|
---|
| 22 | language as the olink itself. The language of an olink
|
---|
| 23 | is determined by its nearest ancestor element with a
|
---|
| 24 | <sgmltag class="attribute">lang</sgmltag> attribute, otherwise the
|
---|
| 25 | value of the <parameter>l10n.gentext.default.lang</parameter>
|
---|
| 26 | parameter.
|
---|
| 27 | </para>
|
---|
| 28 |
|
---|
| 29 | <para>An olink database can contain target data for the same
|
---|
| 30 | document in multiple languages. Each set of data has the
|
---|
| 31 | same value for the <sgmltag>targetdoc</sgmltag> attribute in
|
---|
| 32 | the <sgmltag>document</sgmltag> element in the database, but with a
|
---|
| 33 | different <sgmltag>lang</sgmltag> attribute value.
|
---|
| 34 | </para>
|
---|
| 35 |
|
---|
| 36 | <para>When an olink is being resolved, the target is first
|
---|
| 37 | sought in the document with the same language as the olink.
|
---|
| 38 | If no match is found there, then this parameter is consulted
|
---|
| 39 | for additional languages to try.</para>
|
---|
| 40 |
|
---|
| 41 | <para>The <parameter>olink.lang.fallback.sequence</parameter>
|
---|
| 42 | must be a whitespace separated list of lang values to
|
---|
| 43 | try. The first one with a match in the olink database is used.
|
---|
| 44 | The default value is empty.</para>
|
---|
| 45 |
|
---|
| 46 | <para>For example, a document might be written in German
|
---|
| 47 | and contain an olink with
|
---|
| 48 | <literal>targetdoc="adminguide"</literal>.
|
---|
| 49 | When the document is processed, the processor
|
---|
| 50 | first looks for a target dataset in the
|
---|
| 51 | olink database starting with:</para>
|
---|
| 52 |
|
---|
| 53 | <literallayout><literal><document targetdoc="adminguide" lang="de"></literal>.
|
---|
| 54 | </literallayout>
|
---|
| 55 |
|
---|
| 56 | <para>If there is no such element, then the
|
---|
| 57 | <parameter>olink.lang.fallback.sequence</parameter>
|
---|
| 58 | parameter is consulted.
|
---|
| 59 | If its value is, for example, <quote>fr en</quote>, then the processor next
|
---|
| 60 | looks for <literal>targetdoc="adminguide" lang="fr"</literal>, and
|
---|
| 61 | then for <literal>targetdoc="adminguide" lang="en"</literal>.
|
---|
| 62 | If there is still no match, it looks for
|
---|
| 63 | <literal>targetdoc="adminguide"</literal> with no
|
---|
| 64 | lang attribute.
|
---|
| 65 | </para>
|
---|
| 66 |
|
---|
| 67 | <para>This parameter is useful when a set of documents is only
|
---|
| 68 | partially translated, or is in the process of being translated.
|
---|
| 69 | If a target of an olink has not yet been translated, then this
|
---|
| 70 | parameter permits the processor to look for the document in
|
---|
| 71 | other languages. This assumes the reader would rather have
|
---|
| 72 | a link to a document in a different language than to have
|
---|
| 73 | a broken link.
|
---|
| 74 | </para>
|
---|
| 75 |
|
---|
| 76 | </refsect1>
|
---|
| 77 | </refentry>
|
---|