<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zenphoto - simpler web gallery management &#187; internationalisation &amp; localisation</title>
	<atom:link href="http://www.zenphoto.org/category/user-guide/internationalisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zenphoto.org</link>
	<description>Blog for news about Zenphoto and its development.</description>
	<lastBuildDate>Fri, 10 Sep 2010 22:39:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>General contributor guidelines</title>
		<link>http://www.zenphoto.org/2009/11/general-contributor-guidelines/</link>
		<comments>http://www.zenphoto.org/2009/11/general-contributor-guidelines/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 10:37:31 +0000</pubDate>
		<dc:creator>acrylian</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Theming & Templating]]></category>
		<category><![CDATA[User Guide]]></category>
		<category><![CDATA[internationalisation & localisation]]></category>

		<guid isPermaLink="false">http://www.zenphoto.org/?p=1174</guid>
		<description><![CDATA[
Help on the forum
Provide translations
Test svn/nighty builds and report bugs
Contribtute to documentations or write tutorials
Themes and plugins

Help on the forum
You can help by answering general questions of users the developers do not have the time to answer. If we see you helping a lot you may even be provided with moderator status and so to [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="#forum-help">Help on the forum</a></li>
<li><a href="#translations">Provide translations</a></li>
<li><a href="#testing">Test svn/nighty builds and report bugs</a></li>
<li><a href="#documentation">Contribtute to documentations or write tutorials</a></li>
<li><a href="#themes-and-plugins">Themes and plugins</a></li>
</ol>
<h5><a name="forum-help"></a>Help on the forum</h5>
<p>You can help by answering general questions of users the developers do not have the time to answer. If we see you helping a lot you may even be provided with moderator status and so to speak part of the &#8220;support team&#8221;.</p>
<h5><a name="testing"></a>Test svn/nighty builds and report bugs</h5>
<p>Zenphoto is constantly developed and sometimes new bugs sneak in without being noticed while fixing other things. By testing the <a title="http://www.zenphoto.org/files/nightly/" href="http://www.zenphoto.org/files/nightly/">nightly build</a> or the <a title="http://www.zenphoto.org/trac/browser/trunk" href="http://www.zenphoto.org/trac/browser/trunk">svn</a> you help finding these.</p>
<p>Report any bugs you find via the <a title="http://www.zenphoto.org/trac/report/10" href="http://www.zenphoto.org/trac/report/10">bugtracker</a> (registration required) and provide detailed information what you did and what setup you use (Zenphoto version, theme, server configuration etc.).</p>
<h5><a name="translations"></a>Provide translations</h5>
<p>Before starting you should read our <a title="http://www.zenphoto.org/2008/05/translating-tutorial/" href="http://www.zenphoto.org/2008/05/translating-tutorial/">translating tutorial</a> that has detailed info how Zenphoto&#8217;s translation works and what tools you need to provide a translation.</p>
<h5><a name="documentation"></a>Contribtute to documentations or write tutorials</h5>
<p>We try hard to documentate everything Zenphoto related but there might be things that are missing. You can suggest things on the forum or you can register on <a title="http://www.zenphoto.org/trac" href="http://www.zenphoto.org/trac">Trac</a> and use the somewhat unused Wiki as a sandbox. If your tutorial is good to go we may move it to the real user guide section or provide a link.<br />
Or if you have written on your blog or found something useful elsewhere let us know via the <a title="http://www.zenphoto.org/support" href="http://www.zenphoto.org/support">forum</a>. We then either add to our site and/or post it on our news sections.</p>
<h5><a name="themes-and-plugins"></a>Themes and plugins</h5>
<p>Of course it is assumed that you have some knowledge of general webtechniques and have read specifially <a title="http://www.zenphoto.org/2009/03/theming-tutorial/" href="http://www.zenphoto.org/2009/03/theming-tutorial/">theming tutorial</a>, <a title="http://www.zenphoto.org/2009/06/developer-coding-guidelines/" href="http://www.zenphoto.org/2009/06/developer-coding-guidelines/">developer coding guidelines</a> and other related articles on our <a title="http://www.zenphoto.org/category/User-Guide" href="http://www.zenphoto.org/category/User-Guide">user guide</a> section.</p>
<ul>
<li>Be sure to use the most recent Zenphoto release. Best test also the current nightly build to be save for the next release, too..</li>
<li>Provide a read me file and list if your theme or plugin requires anyhting specific. Also if your theme supports specific plugins or requires special settings to run as expected.</li>
<li>If you took over or modified an existing theme that has been abandoned beware of its licence. While the code may be under a GPL open source license, the design may not and released under a specific license (like the stopdesign themes that are not free for commercial use!)</li>
<li>If you made your own theme or plugin state the license under which you release it.</li>
<li>Create a page for the plugin or theme on your website that we can link to from our themes section as we generally don’t host third party themes or plugins (except for some very old ones we do). A project page on code hosting services like Google Code, Github or the like is of course fine.</li>
<li>Let us know on the <a title="http://www.zenphoto.org/support" href="http://www.zenphoto.org/support">forum</a> what you did so we can add it to the related sections</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.zenphoto.org/2009/11/general-contributor-guidelines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Translating Tutorial</title>
		<link>http://www.zenphoto.org/2008/05/translating-tutorial/</link>
		<comments>http://www.zenphoto.org/2008/05/translating-tutorial/#comments</comments>
		<pubDate>Sat, 17 May 2008 05:55:17 +0000</pubDate>
		<dc:creator>sbillard</dc:creator>
				<category><![CDATA[Customizing]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[User Guide]]></category>
		<category><![CDATA[internationalisation & localisation]]></category>

		<guid isPermaLink="false">http://www.zenphoto.org/?p=75</guid>
		<description><![CDATA[Note: This tutorial refers mainly to the nightly build/svn version of Zenphoto since localization/translation is a work in progress. Zenphoto includes a file &#8220;zp-core/functions-l18n.php&#8221; that contains a prefdefined list of languages and their related locales. Check this list to be sure your language is included. If it is not there, let us know and we [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Note:</strong> This tutorial refers mainly to the nightly build/svn version of Zenphoto since localization/translation is a work in progress. Zenphoto includes a file &#8220;zp-core/functions-l18n.php&#8221; that contains a prefdefined list of languages and their related locales. Check this list to be sure your language is included. If it is not there, let us know and we will add it.</em></p>
<ol>
<li><a href="#what-should-i-know">What should I know before starting a translation </a></li>
<li><a href="#translation-with-poedit">How does Zenphoto&#8217;s translation work?</a></li>
<li><a href="#lang-files-and-naming-conventions">Language files and naming conventions<br />
</a></li>
<li><a href="#starting-translation">Starting a new translation</a></li>
<li><a href="#updating-translation">Updating/modifying an existing translation</a></li>
<li><a href="#plugin-translation">Separate plugin translation</a></li>
<li><a href="#theme-translation">Separate theme translation (post Zenphoto 1.2)</a></li>
<li><a href="#joining-separatate-translations">Joining separatat translation files</a></li>
</ol>
<h4><a title="what-should-i-know" name="what-should-i-know"></a>What should I know before starting a translation?</h4>
<p>Before you start check out the <a title="Zenphoto translations page" href="http://www.zenphoto.org/2008/07/translations/">translations page</a> to see which languages are available or look at the <a title="Translation tickets" href="http://www.zenphoto.org/trac/report/9">translation tickets on the trac</a> to see on which worked is in progress or help is needed. Also check the nightly builds to see if perhaps work is completed and a language files released.</p>
<p>If you don&#8217;t find any ticket for your language (ask on the forum if unsure), open one for it. If you want to do the translation yourself, assign the ticket to yourself and accept it. You can later attach your language files to it. We can only accept files that are submitted via the ticket system.</p>
<p>Keep in mind that if you volunteer to make translations there will be the need of updating the languages files at least for every official release since Zenphoto is a work in progress. You may make your translation based on the current release of zenphoto. Then it can be provided to most Zenphoto users.</p>
<p>You should join the <a href="http://groups.google.com/group/zenphoto-translate">Google Zenphoto translator&#8217;s</a> group. There you will find other like-minded people and be able to ask questions and share experiences. Also the developers post pre-announcements of up-coming Zenphoto releases to this group to give you a heads up so you can get your translations into that release.</p>
<p>Alternatively, you may choose to make your translation against the nightly builds. This way it will be ready for and matched up to the next release of Zenphoto. Currently there are over 2900 strings that need to be translated. Some are only single words though, some are doubled for specific reasons. Since we change strings here and there all the time we recommend doing updates frequently at least once a week, so it will be much easier to match a given release date of the next version. You simply will have less that way than doing all at once. So better think twice before your volunteer&#8230;:-) More on that in detail later.</p>
<p>It would be good if you were quite secure in written English and quite comfortable with Zenphoto itself and with web developement terms in general, even if you no coding is required when making a translation.</p>
<p>Just to note: Since a translation falls under copyright, your translation should be provided under a open licence compatible to Zenphoto&#8217;s GPL licence. If no special licence note is attached, we will assume GPL.</p>
<h4><a title="translation-with-poedit" name="translation-with-poedit"></a>How does Zenphoto&#8217;s translation work?</h4>
<p>Zenphoto uses the <a title="GNU gettext" href="http://www.gnu.org/software/gettext/">gettext technology</a> to provide translation and localization capability. Currently this requires native gettext support, meaning gettext needs to be installed as a PHP extension on your server. But there are plans to provide a replacement for servers without native support some time in the future.</p>
<p>Zenphoto uses the message-level for translation. We use the standard gettext function gettext() to translate strings. If you are working with Zenphoto you might have spotted strings that look like this in the code:</p>
<p><em>Singular:</em></p>
<pre>&lt;?php echo gettext("some text"); ?&gt;</pre>
<p><em>Plural (actually rarely used):</em></p>
<pre>&lt;?php echo ngettext ("Delete the selected file?",  "Delete the selected files?",$var); ?&gt;</pre>
<p>If a translation is found, &#8220;some text&#8221; will be replaced by the translation string. If no translation is found, simply &#8220;some text&#8221; is used.</p>
<p>Additionally Zenphoto uses translatable format strings rather than gettext fragments only (post Zenphoto 1.2).  You will also see strings that look like:</p>
<p><em>Singular:</em></p>
<pre>&lt;?php echo sprintf(gettext('Album %1$u of %2$u'),$var1,$var2); ?&gt;
&lt;?php printf(gettext('Album %1$u of %2$u'),$var1,$var2); ?&gt;</pre>
<p><em>Plural (</em><em>actually </em><em>rarely used):</em></p>
<pre>&lt;?php echo sprintf(ngettext('%u  comment', '%u  comments', $var), $var);  ?&gt;
&lt;?php printf(ngettext('%u  comment', '%u  comments', $var), $var); ?&gt;</pre>
<p>The things which begin with % are parameters that get filled in at runtime. We are using sprintf/printf to format the output. If you are not familiar with these functions you can review the format variables here: <a title="http://us3.php.net/manual/en/function.sprintf.php" href="http://us3.php.net/manual/en/function.sprintf.php">http://us3.php.net/manual/en/function.sprintf.php</a>.</p>
<p>The quick lesson is that the above example has two numbers that will be filled in at runtime. %1$u is the first in the list and %2$u is the second. So the output from this would look like:</p>
<p><tt>Album 5 of 10</tt></p>
<p>If you wish to reverse the order of the elements you just change their place in the string while translating:</p>
<p><tt>'Of %2$u albums this is number %1$u'</tt></p>
<p>would yield</p>
<p><tt>Of 10 albums this is number 5</tt></p>
<p>In short: These variables are required to be included in your translation as well as any html code that may be within a string.</p>
<p>Which language translation to use you can set within the admin options of Zenphoto. There is a separate option for setting the date-format, too. The translation is provided then for the admin interface, setup.php and the standard themes and plugins included in the distribution. Month and day names do not need to be translated manually, these will be done automatically by your server, assuming that your server operates on your (chosen) country&#8217;s locale.</p>
<h4><a name="lang-files-and-naming-conventions"></a>Language files and naming conventions</h4>
<p>Zenphoto gets the translation terms itself from a <strong>.mo-file</strong> (machine object file). This file is binary and contains either the original text and the translation. But the actual file to translate is a <strong>.po-file</strong> (portable object file).</p>
<p>Both files are stored within <tt>zp-core/locale</tt> with the following standard folder structure:</p>
<pre>de_DE/
de_DE/LC_MESSAGES
de_DE/LC_MESSAGES/zenphoto.po
de_DE/LC_MESSAGES/zenphoto.mo</pre>
<p>The folder structure and the filenames are mandatory. You would have to provide an archive of exactly this structure for your language.</p>
<p><em>Upload page upload button:</em> Zenphoto 1.2.5 introduced a new multi file flash upoad that does not allow special characters due to a limitation of the flash script. This requires the creation of an image with your translation serving as the upload button. This button must be named <tt>select_files_button.png</tt> placed in above folder structure:</p>
<pre>de_DE/select_files_button.png</pre>
<p>We have preprepared a <a title=".psd upload button template file" href="http://www.zenphoto.org/trac/attachment/ticket/1128/select_files_button_template_v2.zip">.psd template file for download</a> with instructions in the attached read me file.</p>
<p>If you finished your translation (at least 90%) and think it is ready for release, please zip the entire folder setup described above and rename it like this:<br />
<tt>&lt;locale&gt;-&lt;zenphoto version&gt;.zip</tt> (example: <tt>de_DE-1.1.7.zip</tt> for the zenphoto 1.1.7 release)</p>
<p>Then attach it to your translaton ticket and set the ticket version to the coming Zenphoto version. We will than see that this file is ready for the release and will add your translation file to the svn so it is included  in the release package.</p>
<p>If you just want others to test or help with a svn/nightly translation, please rename the attached zip-file like</p>
<p><tt>&lt;locale&gt;-nightly&lt;date of nightly&gt;</tt> (example: <tt>de_DE-nightly2008-06-30</tt>)<br />
<tt>&lt;locale&gt;-svn&lt;svnnumber&gt;</tt> (example: <tt>de_DE-svn1822</tt>).</p>
<p>In the above examples the German locale &#8220;de_DE&#8221; is used. Here are two lists with some locales for example:</p>
<ul>
<li><a title="http://codex.wordpress.org/WordPress_in_Your_Language" href="http://codex.wordpress.org/WordPress_in_Your_Language">http://codex.wordpress.org/WordPress_in_Your_Language<br />
</a></li>
<li><a title="http://dev.mysql.com/doc/refman/5.0/en/locale-support.html" href="http://dev.mysql.com/doc/refman/5.0/en/locale-support.html">http://dev.mysql.com/doc/refman/5.0/en/locale-support.html</a></li>
</ul>
<p>Since the .mo-file is binary, you can&#8217;t work directly with it, so you have to work with the .po-file instead. This is a normal text file, that looks like this:</p>
<pre>msgid ""
msgstr ""
"Project-Id-Version: zenphoto 1.1.5 svn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-04-09 17:50+0100\n"
"PO-Revision-Date: 2008-04-09 17:56+0100\n"
"Last-Translator: john smith &lt;john@smith.net&gt;\n"
"Language-Team: john smith\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: /Applications/MAMP/htdocs/zenphoto-svn/\n"
"X-Poedit-SearchPath-0: zp-core\n"
"X-Poedit-SearchPath-1: themes\n"

#: zp-core/admin-functions.php:169&gt;
msgid "A reset request has been sent."
msgstr "Eine Reset-Anfrage wurde gesendet."

(...)</pre>
<p>You can edit this file with any text editor. But you have to transform it into a .mo-file to be used for translation. There are several tools that can do that for you:<br />
The official <a title="http://www.gnu.org/software/gettext/" href="http://www.gnu.org/software/gettext/">GNU gettext package</a> includes command-line tools, but you might prefer a real editor with a GUI. For Linux based systems there are for example <a title="https://translations.launchpad.net/" href="https://translations.launchpad.net/">LaunchPad</a> or <a title="http://kbabel.kde.org" href="http://kbabel.kde.org">KBabel</a> and others, but considered the standard tool for this is <a title="http://www.poedit.net" href="http://www.poedit.net">Poedit</a> which is available for Windows, Mac and Linux. We would recommend Poedit (well, we don&#8217;t really know the others..:-)) and the description in the next section uses it. But probably the setup for another editor will be not that different.</p>
<h4><a title="starting-translation" name="starting-translation"></a>Starting a new translation</h4>
<p>There are basically two ways to start on a translation: You could use one of the translation files  included in the Zenphoto distribution and change it to your language. Or you can parse the Zenphoto package yourself using Poedit.<br />
The second is the way we would recommend, because you then can be sure that you don&#8217;t miss any string since we update and change all the time. And it saves workload if you update the file more often than just once when a new version comes out.</p>
<ol>
<li>Download and install Poedit.</li>
<li>Download the latest nightly build of zenphoto and extract the files the same folder where Poedit is or a folder level below. Poedit needs a absolute path to work correctly. This does not need to be within a localhost server setup like <a title="http://en.wikipedia.org/wiki/WAMP" href="http://en.wikipedia.org/wiki/WAMP">WAMP</a>, <a title="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29" href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29">LAMP</a> or <a title="http://en.wikipedia.org/wiki/MAMP" href="http://en.wikipedia.org/wiki/MAMP">MAMP</a>, but of course this would be very useful to test your translation.</li>
<li>On Mac OS X the folder to parse is best located on the same level or below Poedit&#8217;s location in the Applications folder, since the paths to are relative from Poedit&#8217;s location:<br />
Zenphoto folder: <tt>&lt;harddrive&gt;/Applications/MAMP/htdocs/zenphoto<br />
</tt>Poedit: <tt>&lt;harddrive&gt;/Applications/Poedit<br />
</tt>Also working is simply the folder (as used on 6.):<br />
Zenphoto install: <tt>&lt;harddrive&gt;/Applications/zenphoto<br />
</tt>Poedit: <tt>&lt;harddrive&gt;/Applications/Poedit</tt><tt><br />
</tt>On Windows that folder setup seems not to be that important.</li>
<li>Do not install any additional plugins or themes besides the already included ones as some may included additional gettext calls (and separate translation files) that are not necessary for Zenphoto&#8217;s own translation file and bloat the file unnessecarily.<br />
Then open <tt>zenphoto/zp-core/locale</tt> in your zenphoto installation, duplicate the de_DE folder or any other folder and rename it to match your locale.</li>
<li>Now open Poedit and select &#8220;New Catalog&#8221;:<br />
<a title="1-4-new-catalog.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-4-new-catalog.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-4-new-catalog.jpg" alt="1-4-new-catalog.jpg" width="489" height="118" /><br />
</a></li>
<li>In the appearing setttings window enter your data. Most are pretty obvious, only language, country and charset are mandatory. Set the charset to UTF-8. Then you have to enter the string  for &#8220;Plural forms&#8221; because in a few places Zenphoto uses gettext plural forms. For example English has two forms (e.g. day/days) so this would be <tt>nplural=2; plural(n !=1);</tt>. Other languages require different settings. More info about that on the <a title="http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html" href="http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html">gettext plural page</a>.<br />
<a title="1-5-general-data.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-5-general-data.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-5-general-data.jpg" alt="1-5-general-data.jpg" /><br />
</a></li>
<li>Next you need to set the path of the zenphoto folder to parse. (See also 2.) Remember that it is important to divide a path like this <tt>C:\Programs\zenphoto</tt> into the base path <tt>C:\Programs\</tt> and the relative path <tt>zenphoto</tt> (Mac OS X example shown below).<br />
<a title="1-6-folder-path.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-6-folder-path.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-6-folder-path.jpg" alt="1-6-folder-path.jpg" /></a>You can ignore the keywords tab, because Zenphoto uses the default gettext keyword.</li>
<li>In the appearing save window change the name of the file from default.po to zenphoto.po and save/overwrite it within your new <tt>zenphoto/zp-core/locale/&lt;your locale&gt;/LC_MESSAGES/</tt> folder (in the image the German locale is used as example).<br />
<a title="1-7-saving-the-file.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-7-saving-the-file.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-7-saving-the-file.jpg" alt="1-7-saving-the-file.jpg" /></a></li>
<li>You will now see that Poedit searches the zenphoto folder for gettext calls.<br />
<a title="1-8-building-the-file.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-8-building-the-file.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-8-building-the-file.jpg" alt="1-8-building-the-file.jpg" width="488" height="350" /><br />
</a><br />
When finished, simply hit &#8220;Ok&#8221;. Don&#8217;t get confused if Poedit notes a &#8220;Poedit Error&#8221;. It&#8217;s actually a display bug (at least in the Mac version), there is a &#8220;done&#8221; on the right. Everything is fine, no strings harmed.<br />
<a title="1-8b-no-poedit-error.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-8b-no-poedit-error.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-8b-no-poedit-error.jpg" alt="1-8b-no-poedit-error.jpg" /></a></li>
<li>Now you see on the left the original english strings. Klick on an line and you can enter the translation for it below. The two field on the right bottom can be used for comments to the translation, but are not really important now. Singular translation will look like this:<a title="1-9-translation-window.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-9-translation-window.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-9-translation-window.jpg" alt="1-9-translation-window.jpg" width="504" height="376" /><br />
</a><strong><br />
</strong>Plural translation will look like this (<a title="http://www.zenphoto.org/wp-admin/post.php?action=edit&amp;post=75#lang-files-and-naming-conventions" href="http://www.zenphoto.org/wp-admin/post.php?action=edit&amp;post=75#lang-files-and-naming-conventions">see also here about plural strings</a>):<strong><br />
<a href="http://www.zenphoto.org/wp-content/uploads/2008/05/translation-window-plural.jpg"><img class="alignnone size-full wp-image-482" title="translation-window-plural" src="http://www.zenphoto.org/wp-content/uploads/2008/05/translation-window-plural.jpg" alt="translation-window-plural" width="502" height="368" /></a><br />
</strong></li>
<li>Sometimes you will encounter HTML markup within the strings to translate. We have included them because some languages have a very different syntax that might require changing the order within a string. These markup needs to be included within your translation, too. Also you might think that some strings are completly useless like a lonely &#8220;)&#8221; or the double point in &#8220;View image:&#8221; for example. It&#8217;s not forgotton, but on purpose. There are languages that use not only differenty syntax but completly different characters, too. And some even write from right to left, so these characters need to be changeable, too. Sometimes you might see a string that you don&#8217;t need or want to translate. Something like &#8220;SpamAssassin&#8221; is most likely a fixed term for example. You can leave that field empty, but it&#8217;s recommend to fill in the same term, so simply use the context menu to copy the original string to the translation field.<br />
<a title="1-9b-context-menu.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-9b-context-menu.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-9b-context-menu.jpg" alt="1-9b-context-menu.jpg" width="507" height="379" /></a></li>
<li>Some sentences are hard to translate without knowing the context. Poedit&#8217;s context menu will show you were in Zenphoto the referring string is used.<br />
<a title="1-9c-copy-original.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/1-9c-copy-original.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/1-9c-copy-original.jpg" alt="1-9c-copy-original.jpg" /></a></li>
<li>When you are done with translation just hit save and Poedit automatically generates a .mo-file that is used for the translation called zenphoto.mo. Now you should check your translation with Zenphoto.<br />
It&#8217;s recommended to use your zenphoto folder as a base for future translation updates, so that you don&#8217;t have to change the parsing path for Poedit all the time.<br />
Don&#8217;t forget to create a <a title="upload button image" href="http://www.zenphoto.org/wp-admin/#lang-files-and-naming-conventions">upload button</a>!</li>
<li>To submitt your translation to the zenphoto team generate an archive of your locale folder with all its subfolders. Since we probably will provide the files as a additional downloads, a common type like .zip or .tar would be good.</li>
</ol>
<h4><a title="updating-translation" name="updating-translation"></a>Updating or modifying an existing translation</h4>
<ol>
<li>If you choose to update or modify your own translation or a translation someone else had provided, you can just open the .po-file of that locale with Poedit. IMPORTANT: If that file was not generated by you, you would have to check and change the path to parse to match your zenphoto folder in Poedit&#8217;s settings!<br />
<a title="2-1-adjusting-settings.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/2-1-adjusting-settings.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/2-1-adjusting-settings.jpg" alt="2-1-adjusting-settings.jpg" /></a></li>
<li>If you have done that, hit &#8220;Update&#8221; and Poedit will now compare the translation file with the zenphoto folder to check if and what strings have changed.If Poedit finds untranslated strings, they will be listed in the window below you already know. The second tab then will show strings that are not used anymore. These will be deleted from the file. (None found in this example)<br />
.<a title="2-2-new-strings.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/2-2-new-strings.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/2-2-new-strings.jpg" alt="2-2-new-strings.jpg" width="483" height="312" /></a></li>
<li>If you have worked in that language before, Poedit might have collected some terms in its internal dictionary and will try to autotranslate some strings. These strings are then marked in a dark yellow as &#8220;fuzzy&#8221;. Most of the time Poedit is fairly wrong with its guesses though, so don&#8217;t count on that.<a title="2-3-auto-translate.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/2-3-auto-translate.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/2-3-auto-translate.jpg" alt="2-3-auto-translate.jpg" width="514" height="385" /><br />
</a>Blue strings are apparently empty, while successfully translated are printed in black (freshly translated ones are marked with a little star). Poedit lists the percentage of translation, the total number of strings plus the fuzzy strings (autotransation attempts), the bad ones and the untranslated in the bottom left footer.<br />
<a title="2-3b-poedit-statistic.jpg" href="http://www.zenphoto.org/wp-content/uploads/2008/04/2-3b-poedit-statistic.jpg"><img src="http://www.zenphoto.org/wp-content/uploads/2008/04/2-3b-poedit-statistic.jpg" alt="2-3b-poedit-statistic.jpg" /></a></li>
<li>When you are finished with you update, hit &#8220;Save&#8221; again and the .mo-file gets automatically updated. Don&#8217;t forget to create a <a title="upload button image" href="http://www.zenphoto.org/wp-admin/#lang-files-and-naming-conventions">upload button</a> if necessary!</li>
</ol>
<h4><a title="plugin-translation" name="plugin-translation"></a>Plugin translations</h4>
<p>Plugins which are included with the Zenphoto distribution are handled by the normal processing as described above. The process for third-party-plugins is slightly different.</p>
<p>The difference is that you have to parse the plugin file itself. Just create a folder and place your plugin and, if it exists, the plugin&#8217;s subfolder (like some plugins have) within it. Now setup Poedit as described above to parse this special folder.</p>
<p><strong>Important:</strong> The plugin translation files must be placed within <tt>zp-core/plugins/&lt;plugin name&gt;/locale/&lt;language locale&gt;/LC_MESSAGES/</tt> and must have the name of the plugin (<tt>&lt;plugin name&gt;.po &lt;plugin name&gt;.mo</tt>)</p>
<p><strong>Known issue:</strong> Separate plugin translations may override some translation strings that are actually included in the main Zenphoto translation.</p>
<h4><a title="theme-translation" name="theme-translation"></a>Theme translations (post Zenphoto 1.2)</h4>
<p>There are two sources of strings that need to be translated for a theme/site:</p>
<ol>
<li>The first is items in your database such as image and album descriptions. For these to have multiple languages you will need to have the <em>multi-lingual</em> check box checked in your gallery configuration. Once this option is enabled, each edit field in the back-end will have multiple inputs, one for each configured language. You then just fill in the translation for each language you wish to support.</li>
<li>The second and most prominent is the literal strings in the PHP code. If these are all encased in &#8216;gettext()&#8217; calls then the poedit processing will discover them. This is what this tutorial refers to.</li>
</ol>
<p>Themes which are included with the Zenphoto distribution are also handled by the normal processing as described above. The process for third-party-themes is similar than for plugins.</p>
<p>Again you have to parse the theme folder itself. Now setup Poedit as described above to parse your theme folder.</p>
<p>Also read how to setup themes for separate translations:<br />
<a title="http://www.zenphoto.org/2009/03/theming-tutorial/#theme-translations" href="http://www.zenphoto.org/2009/03/theming-tutorial/#theme-translations">http://www.zenphoto.org/2009/03/theming-tutorial/#theme-translations</a></p>
<p><strong>Important:</strong> The theme translation files must be placed within <tt>themes/&lt;theme name&gt;/locale/&lt;language locale&gt;/LC_MESSAGES/</tt> and must have the name of the plugin (<tt>&lt;theme name&gt;.po &lt;</tt><tt>theme </tt><tt>name&gt;.mo</tt>)</p>
<p><strong>Known issue:</strong> Separate theme translations may override some translation strings that are actually included in the main Zenphoto translation.</p>
<h4><a name="joining-separatate-translations"></a>Joining separate translation files</h4>
<p>Poedit provides the <em>translation memory</em> feature that is a kind of dictionary/database to make this task easier. Some resources:</p>
<ul>
<li><a title="http://vasudevkamath.blogspot.com/2010/01/adding-translation-memory-to-poedit.html" href="http://vasudevkamath.blogspot.com/2010/01/adding-translation-memory-to-poedit.html">http://vasudevkamath.blogspot.com/2010/01/adding-translation-memory-to-poedit.html</a></li>
<li><a title="http://blip.tv/file/1054521/" href="http://blip.tv/file/1054521/">http://blip.tv/file/1054521/</a> (Screencast)</li>
<li><span style="text-decoration: line-through;"><a title="http://fisheye3.atlassian.com/browse/~raw,r=1072/poedit/trunk/docs/en/tm.html" href="http://fisheye3.atlassian.com/browse/~raw,r=1072/poedit/trunk/docs/en/tm.html">http://fisheye3.atlassian.com/browse/~raw,r=1072/poedit/trunk/docs/en/tm.html</a></span> (inactive)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.zenphoto.org/2008/05/translating-tutorial/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
