Adding new languages to LogicalDOC
Contents
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.
Plug-in |
Description |
Plug-in Version |
LD Compatibility | Contributors |
Released |
logicaldoc-language-tr |
Support for Turkish language |
5.2 |
5.0/5.2 |
Levent Ercan | 2010-08-10 |
logicaldoc-language-pt_br |
Support for Brazilian language |
5.1 |
5.2.1 |
Sam Samuels Dejair Ferreira Junior |
2010-07-22 |
logicaldoc-language-sq |
Support for Albanian language |
5.1 |
5.2.1 |
Admirim Ymeri | 2010-07-22 |
logicaldoc-language-da |
Support for Danish language |
5.1.1 |
5.0/5.2.1 |
Ask Hjorth Larsen Kim Hansen |
2010-06-16 |
logicaldoc-language-fa |
Support for Persian language |
5.0 |
4.6/5.0 |
Tekoshar bo jian | 2010-02-25 |
logicaldoc-language-hu |
Support for Hungarian language |
4.6 |
4.6/5.0 |
Kuti Sándor | 2009-11-19 |
logicaldoc-language-ru |
Support for Russian language |
4.5.2 |
4.5.1 |
Alexander Kosyakov | |
logicaldoc-language-el |
Support for Greek language |
4.5.1 |
4.5.1 | Marinos Vlasakis | |
logicaldoc-language-pt |
Support for Portuguese language |
4.5.0 |
4.5.1 | Marta Figueiredo | |
logicaldoc-language-nl |
Support for Dutch language |
4.5.0 |
4.5.1 | Dennie de Lange, Leon Jamieson | |
logicaldoc-language-zh |
Support for Chinese language |
4.5.1 |
4.5.1 | Tong Hongxian |
To activate a localization plug-in, follow these steps:
- Shutdown the Tomcat that runs LogicalDOC
- Copy the file into the plugins folder
eg.: c:\tomcat-6.0.20\webapps\logicaldoc\WEB-INF\plugins - 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.
Create a localization Plug-in
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 ).
<extension plugin-id="logicaldoc-core" point-id="Language" id="pt_BRLanguage"> <parameter id="locale" value="pt_BR" /> <parameter id="analyzer" value="org.apache.lucene.analysis.br.BrazilianAnalyzer" /> </extension>
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
.