wiki:HowToTranslate

Version 8 (modified by iburago, 15 years ago) ( diff )

--

How to translate GeoNetwork

This page describes steps necessary to include support of language other than pre-installed into existing instance of GeoNetwork and it's configuration components.

Translation of the user interface

Follow next steps to create new language.

  • Create new record in Languages table in GeoNetwork's database with new language's two-letter code.
  • In tables which name ends with Des copy all entries marked en (or any other existing language) to entries with new language code. After that it's possible to edit these fields using Web-interface.
  • Copy folders (all paths listed from GeoNetwork's root folder) to folders with new language code. (Any existing language could be treated as base for translation, not only English.) Then change copied values with translated strings, of course.
    • User interface
      • web/geonetwork/loc/en,
      • web/intermap/loc/en.
    • Metadata standards
      • web/geonetwork/xml/schemas/dublin-core/loc/en,
      • web/geonetwork/xml/schemas/fgdc-std/loc/en,
      • web/geonetwork/xml/schemas/iso19115/loc/en,
      • web/geonetwork/xml/schemas/iso19139/loc/en.
    • Profile specific folders of sandboxes like Bluenet, GéoSource or geocat.ch.
  • In all files web/geonetwork/loc/<language code>/strings.xml add tags with new language's code and it's name. These string used by GeoNetwork to list languages in interface switcher and indicate current a current one. For example, while adding Russian language identified by ru, it's necessary to include into those files <ru>Русский</ru> line. Here ru is the code for Russian and Русский is the Russian name on Russian.
  • Add new language's link in interface switcher banner at the main page. Open web/geonetwork/xsl/banner.xsl for editing and find code:
    <xsl:choose>
      <xsl:when test="/root/gui/language='en'">
        <font class="banner-active"><xsl:value-of select="/root/gui/strings/en"/></font>
      </xsl:when>
      <xsl:otherwise>
        <a class="banner" href="{/root/gui/service}/en/main.home"><xsl:value-of select="/root/gui/strings/en"/></a>
      </xsl:otherwise>
    </xsl:choose>
    
    Duplicate this fragment (separating new from old using '|') and change en to the code of new language.

Propose translation for integration

You can choose one of these two ways:

  • Create a patch if your are familiar with SVN.
  • Create a ZIP archive with all needed files:

Once done, send the translation to the devel mailing list and/or create a ticket on trac with files attached.

Translate GAST

Files to localize:

  • gast/data/gui_de.properties
  • src/org/fao/gast/localization/message_de.properties

Translate the installer

The only file to localize is

  • packsLang.xml_deu

Translate the documentation

Documentation is located in

  • docs/docbook/gn_manual_deu
Note: See TracWiki for help on using the wiki.