Skip to end of metadata
Go to start of metadata

<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>
<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)
<br class="atl-forced-newline" /></p>

<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 "docbook-xsl" will be added to the "build" folder.</strong></p>
</ac:rich-text-body></ac:macro>

<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>

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

<h3>Changing the direction of the contents in the page to be RTL</h3>

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

<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

<h3>Reseting the direction of the '<code><pre></code>' tag to be LTR</h3>

<ol>
<li>open "\build\docbook-xsl\html\verbatim.xsl"</li>
<li>on the lines #51, 58, 91 and 111<br />
replace
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[ '<pre class="

Unknown macro: {name(.)}

">' ]]></ac:plain-text-body></ac:macro>
with
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[ '<pre class="

" dir="ltr" >' ]]></ac:plain-text-body></ac:macro></li>
</ol>

<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

<h3>Aligning the contents to right:</h3>

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

Unknown macro: { text-align}

]]></ac:plain-text-body></ac:macro></li>
</ol>

<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

<h3>Translating the generated static words in the docs</h3>
<p>what I mean is replacing the words like "Next, index, chapter ..etc" 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 "\build\docbook-xsl\common\" for list of supported translations.</p></ac:rich-text-body></ac:macro>

<ol>
<li>open "\manual.xml"</li>
<li>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.<br />
f.e. if you are translating to Arabic(ar), it will be
<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 "title" and "edition" with the content's translation.</li>
</ol>

<p><br class="atl-forced-newline" /></p>
<hr />
<p><br class="atl-forced-newline" /></p>

<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 "<code>$name</code>" and "<code>Zend::dump()</code>".<br />
this words will appear in the generated Docs in that way ( "<code>name$</code>" and "<code>()Zend::dump</code>".
<br class="atl-forced-newline" />
The solution: when translating write this words in that way ( "<code>name$</code>" and "<code>()Zend::dump</code>" ) so when it's displayed in the Docs, it will appear in the right way.</p>
</ac:rich-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.