Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Info

Valid from 5.0

The documentation below is valid from Datafari 5.0 upwards

For now Datafari is preconfigured to display its menu and functionalities (not to be mixed up with the languages that can be analysed at the indexing phase) for English, French, German, Italian, Arabic, Brazilian Portuguese and Russian. See further below for the default languages that can be analysed at the indexing and search phases.

Step-by-step guide for an existing Datafari

...

  1. The folder to store the i18n config files is here : /opt/datafari/tomcat/webapps/Datafari/resources/js/AjaxFranceLabs/locale. Just open it and add your new language. For example if you add German translation, put here a file named de.json.
    Also add a new entry in all the i18n files corresponding to your new language. For example to add Spanish language, we added the following entry in all the i18n files :

    Code Block
    "es_locale" : "Español" 

  2.  For now, we need to add the new language in a Java class. So you will need to download the source code of Datafari, modify the class and upload it to your Datafari server. The class that needs to be modified is this one : com.francelabs.datafari.utils.LanguageUtils.java located in the datafari-webapp module. You need to modify the following line by adding your language :

    Code Block
    public static final List<String> availableLanguages = Arrays.asList("en", "fr", "it", "ar", "ru");

    Then recompile the source code. When you are done, just send back the file $YOUR_DATAFARI_PROJECT/datafari-webapp/target/classes/com/francelabs/datafari/utils/LanguageUtils.class into your Datafari server to this location : /opt/datafari/tomcat/webapps/Datafari/WEB-INF/classes/com/francelabs/datafari/utils.
    Then you need to restart Datafari to load your changes.

  3. Add the new language in /opt/datafari/tomcat/webapps/Datafari/resources/js/AjaxFranceLabs/i18njs.js :

    Code Block
    availableLanguages : [ 'en', 'fr', 'it', 'ar', 'ru' ],


  4. Create a file with the new language : LOCALE.json , for example es.json into the folder /opt/datafari/tomcat/webapps/Datafari/resources/customs/i18n
    Add this content into it :

    Code Block
    {}

NB : no error on the content : it is really only : {}

For the internationalization of the language detection, indexing and search by the Datafari Solr engine :

...

Info

Valid from 4.4

The documentation below is valid from Datafari 4.4 upwards

For now Datafari is preconfigured to display its menu and functionalities (not to be mixed up with the languages that can be analysed at the indexing phase) for English, French, German, Italian, Arabic, Brazilian Portuguese and Russian. See further below for the default languages that can be analysed at the indexing and search phases.

Step-by-step guide

For the internationalization of the user interface, we use the i18n java library:

...