wiki:HowToTranslate

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

--

How-to translate GeoNetwork?

This how-to describes steps necessary to add a new language support into existing GeoNetwork installation.

Translation of the user interface

All you need to create new language is following:

  • Create new record in languages table in your GeoNetwork's database.
  • In all tables which name ends with Des copy all entries marked en (or any other language) to entries with new language code. Then you will be able to edit these fields using Web-interface.
  • Copy folders (all paths listed from GeoNetwork's root folder) to folders with new language code. (You can use any language as base for translation, not only English.)
    • 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.

Copy also profile specific folders if you're running sandboxes like Bluenet, GéoSource or geocat.ch. Then you should change copied values with translated strings, of course.

  • In all files web/geonetwork/loc/<language code>/strings.xml add tags with new language's code and it's name. These string will be used by GeoNetwork to indicate current language in interface switcher. For example, adding Russian language identified by ru in GeoNetwork, include into those files string <ru>Русский</ru>. Here ru is the code for Russian language and Русский is the Russian language name on Russian.
  • Add new language link in the banner at the main page. Open web/geonetwork/xsl/banner.xsl for editing and find this 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 language you're adding.

Propose your translation for integration into trunk

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.