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.
||Support for Turkish language
||Support for Brazilian language
Dejair Ferreira Junior
||Support for Albanian language
||Support for Danish language
||Ask Hjorth Larsen
||Support for Persian language
||Tekoshar bo jian||2010-02-25|
||Support for Hungarian language
||Support for Russian language
||Support for Greek language
||Support for Portuguese language
||Support for Dutch language
||4.5.1||Dennie de Lange,|
||Support for Chinese language
To activate a localization plug-in, follow these steps:
- Shutdown the Tomcat that runs LogicalDOC
- Copy the file into the plugins folder
- 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_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:
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.
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