compared with
Current by Gavin
on Nov 22, 2006 13:39.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (58)

View Page History
<p>If the language that you are translating to is writen from right to left, maybe you will face some problems with DocBook and the words won't appear in the right way.<br />
I met this problem too when I was translating to Arabic, but I did some steps which helped in solving the problem and I hope that this steps will help you too.</p>
{note:title=PS}
<ac:macro ac:name="note"><ac:parameter ac:name="title">PS</ac:parameter><ac:rich-text-body>
<p> All the following steps will take place in your language's directory on SVN<br />
f.e. \svn\trunk\documentation\manual\ar (the Arabic Language dir)
\\

*after [compiling|http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Translator+-+Manual+Compilation+Instructions] your manual, a new folder called "docbook-xsl" will be added to the "build" folder.*

{note}
<br class="atl-forced-newline" /></p>

h1. Table of Contents
<p> <strong>after <a href="http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Translator+-+Manual+Compilation+Instructions">compiling</a> your manual, a new folder called &quot;docbook-xsl&quot; will be added to the &quot;build&quot; folder.</strong></p>
</ac:rich-text-body></ac:macro>

{toc-zone:location=top|type=list|style=none|outline=false|indent=20px|printable=true}
<h1>Table of Contents</h1>

<ac:macro ac:name="toc-zone"><ac:parameter ac:name="location">top</ac:parameter><ac:parameter ac:name="type">list</ac:parameter><ac:parameter ac:name="style">none</ac:parameter><ac:parameter ac:name="outline">false</ac:parameter><ac:parameter ac:name="indent">20px</ac:parameter><ac:parameter ac:name="printable">true</ac:parameter><ac:rich-text-body>


\\

h3. Changing the direction of the contents in the page to be RTL
<p><br class="atl-forced-newline" /></p>

# open "\build\docbook-xsl\html\docbook.xsl"
<h3>Changing the direction of the contents in the page to be RTL</h3>

<ol>
<li>open &quot;\build\docbook-xsl\html\docbook.xsl&quot;</li>
# after <li>after the line #116 which contains
{code}
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
'<xsl:attribute name="alink">#0000FF</xsl:attribute>'
{code}
]]></ac:plain-text-body></ac:macro>
add this line
{code}
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
'<xsl:attribute name="dir">rtl</xsl:attribute>'
]]></ac:plain-text-body></ac:macro></li>
{code} </ol>

\\
-----
\\

h3. Reseting the direction of the '{{<pre>}}' tag to be LTR
<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

# open "\build\docbook-xsl\html\verbatim.xsl"
# on the lines #51, 58, 91 and 111
<h3>Reseting the direction of the '<code>&lt;pre&gt;</code>' tag to be LTR</h3>

<ol>
<li>open &quot;\build\docbook-xsl\html\verbatim.xsl&quot;</li>
<li>on the lines #51, 58, 91 and 111<br />
replace
{code} '<pre class="{name(.)}">' {code}
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[ '<pre class="{name(.)}">' ]]></ac:plain-text-body></ac:macro>
with
{code} '<pre class="{name(.)}" dir="ltr" >' {code}
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[ '<pre class="{name(.)}" dir="ltr" >' ]]></ac:plain-text-body></ac:macro></li>
</ol>

\\
-----
\\

h3. Aligning the contents to right:
<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

# open "\html\dbstyle.css"
# add this at the end of the file.
{code} p { text-align: right;} {code}
<h3>Aligning the contents to right:</h3>

\\ <ol>
<li>open &quot;\html\dbstyle.css&quot;</li>
<li>add this at the end of the file.
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[ p { text-align: right;} ]]></ac:plain-text-body></ac:macro></li>
----- </ol>
\\


h3. Translating the generated static words in the docs
what I mean is replacing the words like "Next, index, chapter ..etc" with its
equal words in the language that's you are translating to.
<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

{note:title=Is my language supported?}
check "\build\docbook-xsl\common\" for list of supported translations.
{note}

# open "\manual.xml"
# on line #8 change the value of the attribute "lang" of the tag "book" from "en" to the acronym of the language that you are translating to.
<h3>Translating the generated static words in the docs</h3>
<p>what I mean is replacing the words like &quot;Next, index, chapter ..etc&quot; with its<br />
equal words in the language that's you are translating to.</p>

<ac:macro ac:name="note"><ac:parameter ac:name="title">Is my language supported?</ac:parameter><ac:rich-text-body>
<p>check &quot;\build\docbook-xsl\common\&quot; for list of supported translations.</p></ac:rich-text-body></ac:macro>

<ol>
<li>open &quot;\manual.xml&quot;</li>
<li>on line #8 change the value of the attribute &quot;lang&quot; of the tag &quot;book&quot; from &quot;en&quot; to the acronym of the language that you are translating to.<br />
f.e. if you are translating to Arabic(ar), it will be
{code}'<book id="manual" lang="ar">'{code}
# replace the contents of the tags "title" and "edition" with the content's translation.
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA['<book id="manual" lang="ar">']]></ac:plain-text-body></ac:macro></li>
<li>replace the contents of the tags &quot;title&quot; and &quot;edition&quot; with the content's translation.</li>
</ol>

\\
-----
\\

h3. Fixing the problem of the embeded english words in the content
<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

The problem: when you set the direction of the contents to be RTL and there is english words embeded in the content formated like "{{$name}}" and "{{Zend::dump()}}".
this words will appear in the generated Docs in that way ( "{{name$}}" and "{{()Zend::dump}}".
\\
The solution: when translating write this words in that way ( "{{name$}}" and "{{()Zend::dump}}" ) so when it's displayed in the Docs, it will appear in the right way.
<h3>Fixing the problem of the embeded english words in the content</h3>

<p>The problem: when you set the direction of the contents to be RTL and there is english words embeded in the content formated like &quot;<code>$name</code>&quot; and &quot;<code>Zend::dump()</code>&quot;.<br />
this words will appear in the generated Docs in that way ( &quot;<code>name$</code>&quot; and &quot;<code>()Zend::dump</code>&quot;.
<br class="atl-forced-newline" />
The solution: when translating write this words in that way ( &quot;<code>name$</code>&quot; and &quot;<code>()Zend::dump</code>&quot; ) so when it's displayed in the Docs, it will appear in the right way.</p>
{toc-zone} </ac:rich-text-body></ac:macro>