We welcome translations to new languages, or improvements to the currently available languages. Send translations to the mailing list, or attach them to an issue in Jira. Make sure you use UTF-8 encoding in your files (except for the .properties files -- see below). Also, check on the mailing list if anybody else is working on the same language as you.
Daisy and the Daisy Wiki can be translated to different languages. For this purpose, text to be displayed to users is retrieved from a language-specific file, usually called a resource bundle.
There are three different types of resource bundles used by Daisy:
When editing resource bundles, take care of the encoding of the files, as explained below.
We prefer to keep all the XML and .js (javascript) files UTF-8 encoded, for all languages. Therefore, take care to use the correct encoding when opening and saving files in your text editor.
The ".properties" files should always be ISO-8859-1 encoded. Characters not supported by ISO-8859-1 can be inserted using Java unicode escapes. A Java unicode escape takes the form "\uHHHH" in which the HHHH are hexadecimal digits specifying the unicode character. Usually you don't want to edit this by hand, the unix recode utility can be handy here:
recode JAVA..UTF-8 somefile.properties
recode UTF-8..JAVA somefile.properties
Below is an overview of the translatable resources that currently exists. The given directory paths refer to locations inside the source tree, in the binary distribution these locations are a bit different (and the .property files are bundled inside the jar files). See further on this page for practical instructions.
applications/daisywiki/frontend/src/cocoon/webapp/ daisy/resources/i18n/messages_<lang>.xml
applications/daisywiki/frontend/src/cocoon/webapp/ daisy/resources/skins/default/i18n/messages_<lang>.xml
applications/daisywiki/frontend/src/cocoon/webapp/ daisy/resources/cocoon/forms/htmlarea/plugins/*/lang/<lang>.js
install/src/java/org/outerj/daisy/install/daisywiki_schema.xml (this is the same file for all languages)
applications/daisywiki/frontend/src/java/org/outerj/daisy/ frontend/components/userregistrar/messages_<lang>.properties
applications/daisywiki/frontend/src/cocoon/webapp/daisy/ resources/navtree_editor/lang/navtree_<lang>.js
and
applications/daisywiki/frontend/src/cocoon/webapp/daisy/ resources/tree_editor/lang/tree_<lang>.jsand
applications/daisywiki/frontend/src/cocoon/webapp/daisy/ resources/book_editor/lang/booktree_<lang>.js
applications/daisywiki/frontend/src/cocooon/webapp/daisy/ books/publicationtypes/common/i18n/messages_<lang>.xml
and
applications/daisywiki/frontend/src/cocooon/webapp/daisy/ books/publicationtypes/html-chunked/i18n/messages_<lang>.xml
applications/daisywiki/frontend/src/cocoon/webapp/daisy/ resources/js/widget/nls/...
repository/api/src/java/org/outerj/daisy/repository/messages_<lang>.properties
repository/server/src/java/org/outerj/daisy/query/model/messages_<lang>.properties
services/diff/src/java/org/outerj/daisy/diff/messages_<lang>.properties
services/workflow/server-impl/src/java/org/outerj/daisy/ workflow/serverimpl/messages_<lang>.properties
services/emailnotifier/server-impl/src/java/org/outerj/daisy/ emailnotifier/serverimpl/formatters/messages_<lang>.properties
services/workflow/server-impl/src/processes/*/i18n/* services/workflow/server-impl/src/processes/common-i18n/*
To make the new language appear on the locale selection page, its ISO language code should be added to the following file:
applications/daisywiki/frontend/src/cocoon/webapp/daisy/resources/conf/locales.txt
All installation messages of the windows installer are kept inside on single file, which also acts as template for any new languages to be added:
distro/windows-installer/installer/lang/english.nsh
The NSIS installer does not support Unicode yet, it assumes no encoding and just copies the bytes as is. Therefore the encoding used is mentioned in the comment section in the header of the .nsh language file. In order to display the messages correctly, the default language for non-Unicode applications in the language control panel of your Windows installation has to be set appropriately.
Install the subversion client if you don't have it already.
Check out the Daisy source tree:
svn co http://svn.cocoondev.org/repos/daisy/trunk/daisy
After editing the files, create a patch by executing the following command in the root of the Daisy source tree:
svn diff > mypatch.txt
and send the mypatch.txt file to the mailing list.