Changes between Version 3 and Version 4 of HowToTranslate


Ignore:
Timestamp:
Mar 21, 2009, 6:20:20 AM (15 years ago)
Author:
fxp
Comment:

Add details provided by Igor V Bugaro

Legend:

Unmodified
Added
Removed
Modified
  • HowToTranslate

    v3 v4  
    11== How-to translate GeoNetwork ? ==
    22
    3  * Translate application (User interface)
    4   * Translate user interface : web/geonetwork/loc/strings/eng/xml/strings.xml
    5   * Translate metadata standards :
    6    * web/geonetwork/xml/schemas/iso19139/loc/eng/labels.xml or codelist.xml or schematron.xml if general
    7    * web/geonetwork/xml/schemas/iso19139.che/loc/eng/labels.xml or codelist.xml if profil specific
     3To make language change in your GeoNetwork, in fact, it's not difficult.
    84
    9 TODO : add example.
     5=== Translation of the user interface ===
    106
    11  * Translate db specific content : gast/setup/db/*Des.ddf
    12  * GAST
    13   * gast/data/gui_de.properties
    14   * src/org/fao/gast/localization/message_de.properties
     7All you need to create new language is following:
     8 * Create new record in 'languages' table in your GeoNetwork's database.
     9 * In all tables which name ends with 'Des' copy all entries marked
     10'en' (or any other language) to entries with new language code. Then
     11you will be able to edit these fields using Web-interface.
     12 * Copy folders (all paths listed from GeoNetwork's folder) to folders with new language code. (You can use any language as
     13base for translation, not only English.)
     14  * User interface
     15   * 'web/geonetwork/loc/en',
     16   * 'web/intermap/loc/en',
     17  * Metadata standards
     18   * 'web/geonetwork/xml/schemas/dublin-core/loc/en',
     19   * 'web/geonetwork/xml/schemas/fgdc-std/loc/en',
     20   * 'web/geonetwork/xml/schemas/iso19115/loc/en',
     21   * 'web/geonetwork/xml/schemas/iso19139/loc/en'
     22Copy also profil specific folders if you're running sandboxes like Bluenet, GéoSource or geocat.ch.
     23
     24    Then you should change copied values with translated strings, of course.
     25 * In *all* files 'web/geonetwork/loc/<language code>/strings.xml' you
     26should add tags with new language's code and it's name. These string
     27will be used by GeoNetwork to indicate current language in language
     28switcher in interface. It's a little hard to explain, look at the
     29example :
     30    Adding Russian language identified by 'ru' in my GeoNetwork, so add string
     31        <ru>Русский</ru>
     32    in all that files, where 'ru' is Russian language code and
     33'Русский' is Russian language name on Russian.
     34 * Add new language link in the banner at the main page.
     35    Open 'web/geonetwork/xsl/banner.xsl' for editing and find this code:
     36{{{
     37    <xsl:choose>
     38        <xsl:when test="/root/gui/language='en'">
     39            <font class="banner-active"><xsl:value-of
     40select="/root/gui/strings/en"/></font>
     41        </xsl:when>
     42        <xsl:otherwise>
     43            <a class="banner"
     44href="{/root/gui/service}/en/main.home"><xsl:value-of
     45select="/root/gui/strings/en"/></a>
     46        </xsl:otherwise>
     47    </xsl:choose>
     48}}}
     49Duplicate this fragment (separate new from old using '|') and 'en'
     50to new language code.
     51
     52That's all!
     53
     54
     55=== Propose your translation for integration into trunk ===
     562 options :
     57 * Create a patch if your are familiar with SVN.
     58 * Create a zip with all needed files :
     59  * Zip all loc directories.
     60  * For database content, use [[http://druid.sourceforge.net/ Druid]] to export tables which name ends with 'Des'.
     61   * export as Druid format (ddf).
     62
     63Once done, send the translation to the devel mailing list and/or create a ticket on trac with files attached.
     64
     65
     66=== Translate GAST ===
     67 * gast/data/gui_de.properties
     68 * src/org/fao/gast/localization/message_de.properties
     69
     70=== Translate the installer ===
    1571 * Installer : packsLang.xml_deu
     72
     73=== Translate the documentation ===
    1674 * Translate documentation : docs/docbook/gn_manual_deu
    1775
    1876
    19 Once done, send the translation to the devel mailing list and/or create a ticket on trac with patch attached.
    2077
    2178
    22