Home - VIVO-DE/VIVO-languages GitHub Wiki
This repository - along with https://github.com/VIVO-DE/Vitro-languages - contain the German translations of VIVO.
The file structure of the repository is intended to mirror that of the the Vitro/VIVO projects, so that it produces artifacts that can be combined during the packaging phases of the Vitro/VIVO builds.
Whilst there may be delays in implementing translations, it should be assumed that the develop branches track what is required for the current develop branches of Vitro/VIVO. As releases of Vitro/VIVO occur, maintenance branches will be made that reflect the maintenance branches in the Vitro/VIVO projects. Fixes to translations relating to a released version should occur in the maintenance branch(es), and merged to the develop branch.
To install a language pack, you need to make modifications to the installer projects. For this, you should be using a custom installer. If you are using a Vitro/VIVO release package, that does not contain an API directory, then this is effectively a custom installer.
However if you are using Vitro/VIVO cloned from GitHub, and it contains an "installer" subdirectory, then if you haven't already done so, you should copy this installer directory to another location, outside of your Vitro / VIVO directories, and use this as your custom installer. You can set the vitro-installer-dir / vivo-installer-dir property in a settings.xml file to have your Vitro/VIVO build use your custom installer to deploy your customised application (as per the VIVO documentation).
Note: If you are installing Vitro, then you just need the Vitro-languages repository. For VIVO, you will require BOTH the Vitro-languages and VIVO-languages repositories.
To clone the repositories, use the following commands:
git clone https://github.com/VIVO-DE/Vitro-languages Vitro-languages
git clone https://github.com/VIVO-DE/VIVO-languages VIVO-languages
You may clone these repositories anywhere you like, however, I would recommend that you place them outside of your custom installer, and outside of any Vitro/VIVO source directories. For projects that use the full Vitro / VIVO source code, my directory layout is usually as follows:
project/
Vitro/
VIVO/
Vitro-languages/
VIVO-languages/
custom-installer/
custom-settings.xml
(In a configuration like this, I would install VIVO by going into the VIVO directory, and running "mvn clean install -s ../customer-settings.xml - this will then use my settings in custom-settings.xml to compile Vitro and VIVO from source, and use the custom installer, along with the language packs, to deploy the application.)
The following instructions will assume that you are using a similar layout, however, if you are using a different directory structure, then you will need to adjust the paths accordingly.
In using the German language repositories, you will need to make the following adjustments:
- Add the language repository(ies) as modules to the installer project.
- Add the home language artifacts as a dependency to the installer's home module.
- Add he webapp language artifacts as a dependency and overlay to the installer's webapp module.
In your custom installer project, edit the pom.xml. Find the section and add module entries for each language repository, using the path to where you have cloned them. Assuming the directory layout above, your modules should look like this:
<modules>
<module>../Vitro-languages</module>
<module>../VIVO-languages</module>
<module>home</module>
<module>solr</module>
<module>webapp</module>
</modules>
Note that the order is not important - Maven will sort the module order to satisfy the dependencies.
By making this change, you are bringing the Maven projects from the language repositories into the Maven reactor of the installer, making their artifacts available to the other modules without first having to install or deploy them.
Note: This step is only required for VIVO. If you are only using Vitro, you only need to add the webapp artifacts.
In your custom installer project, edit the home/pom.xml file. Scroll down to the section, and insert the following dependency:
<dependency>
<groupId>org.vivoweb</groupId>
<artifactId>vivo-languages-home</artifactId>
<version>1.11.0-SNAPSHOT</version>
<type>tar.gz</type>
</dependency>
Important: make sure that the version (as well as the groupId and artifactId) match that which is defined in the VIVO-languages project. If there is a mismatch, the installation will fail, saying that a dependency is not satisfied.
In your custom installer project, edit the webapp/pom.xml file. Scroll down to the section, and insert the following dependencies:
<dependency>
<groupId>org.vivoweb</groupId>
<artifactId>vitro-languages-webapp</artifactId>
<version>1.11.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.vivoweb</groupId>
<artifactId>vivo-languages-webapp</artifactId>
<version>1.11.0-SNAPSHOT</version>
<type>war</type>
</dependency>
Important: make sure that the version (as well as the groupId and artifactId) match that which is defined in the Vitro-languages and VIVO-languages projects. If there is a mismatch, the installation will fail, saying that a dependency is not satisfied.
Whilst in the webapp/pom.xml file, find the section (it is a sub-entry of the section), and insert the following:
<overlay>
<groupId>org.vivoweb</groupId>
<artifactId>vitro-languages-webapp</artifactId>
<type>war</type>
</overlay>
<overlay>
<groupId>org.vivoweb</groupId>
<artifactId>vivo-languages-webapp</artifactId>
<type>war</type>
</overlay>
Once you have cloned the language repositories, and modified the project files, you will now be able to install a Vitro or VIVO with German language support. To do so, simply run the installation process as you normally would. E.g:
mvn clean install -s ../custom-settings.xml
If all is successful, you will see the Vitro-languages and VIVO-languages modules listed in the reactor summary, your VIVO home directory will have the German language in the rdf directory (e.g. rdf/applicationMetadata/everytime/classgroups_labels_de_DE.nt), and the web application will have the German properties files.
To complete the installation, you need to edit your runtime.properties in your home or home/config directory, enable the language filtering and add the German locale to the selectable locales entry:
RDFService.languageFilter = true
languages.selectableLocales = en_US, de_DE
When you start VIVO, you will now have the language selector, with English and German available as options.