Adding new languages to LogicalDOC

Setup a New Language
Adding a new language to LogicalDOC is quite simple.

The activity usually involves the installation of a localization plug-in that has the following features:


 * It provides translations for the GUI (Graphical User Interface)
 * Instructs LogicalDOC saying that a new language is available
 * Specify which language analyzer Lucene must use for indexing the text extracted from documents and for full-text search.

Standard languages English, Italian, French, German and Spanish are available in the basic application, while others have been kindly contributed by the open source community of LogicalDOC.

To enable a different language, you must download and install on your system a compressed Zip file that represent the localization plug-in.

To activate a localization plug-in, follow these steps:


 * 1) Shutdown the Tomcat that runs LogicalDOC
 * 2) Copy the file into the plugins folder eg.: c:\tomcat-6.0.20\webapps\logicaldoc\WEB-INF\plugins
 * 3) Restart Tomcat

For the localization plugins there is no need to perform the setup procedure, this steps is required only for the plugins that add new business objects. Note: The translations of these plugins may be incomplete or inaccurate, if you want to give your contribution as of August 2009 is available on Launchpad the new platform for translations of LogicalDOC. At intervals of about 2 weeks a localization update bundle for LogicalDOC will be issued taken by the new translation system.

Translating the resource boundle
Please refer to page Translate LogicalDOC

Making the localization plug-in
LogicalDOC supports language localization through an extension point (plug-in) of LogicalDOC called Language. In practice this is to produce an artifact (a compressed Zip file) with a class and some other resources that implements the properties defined for the extension point Language.

Below are the sources of the Maven2 project and the binary versions of a plugin Language to support Danish language. NOTE: this is a full translation of LogicalDOC 5.1. logicaldoc-lang-da-5.1.1-plugin.zip logicaldoc-lang-da_src.zip (project sources)

To activate the new language simply drop the file logicaldoc-lang-da-5.1.1-plugin.zip into the plugins folder of LogicalDOC: C:\tomcat-6.0.20\webapps\logicaldoc\WEB-INF\plugins then restart your Tomcat (to activate the plugin) and login choosing the Danish language.

For greater clarity enclose another example complete of sources of the plugin created to support the Brazilian variant of Portuguese language.

logicaldoc-lang-pt_br-4.5.0-plugin.zip logicaldoc-lang-pt_br-4.5_src.zip (project sources)

The big difference here is in the definition file of the plugin (plugin.xml). In this case, unlike the previous, we can specify the implementation of analysis of language used by Lucene (which is the framework for indexing and research used by LogicalDOC ). &lt;extension plugin-id="logicaldoc-core" point-id="Language" id="pt_BRLanguage"&gt; &lt;parameter id="locale" value="pt_BR" /&gt; &lt;parameter id="analyzer" value="org.apache.lucene.analysis.br.BrazilianAnalyzer" /&gt; &lt;/extension&gt; extract from the plugin definition file: plugin.xml in this piece of code is shown the implementation of language analyzer that will be used by Lucene for the indexing and research in Brazil language that is the class: org.apache.lucene.analysis.br.BrazilianAnalyzer

.