Changes between Version 4 and Version 5 of HowToTranslate


Ignore:
Timestamp:
Mar 26, 2009, 12:20:30 AM (15 years ago)
Author:
iburago
Comment:

Cleaning and fixing some errors.

Legend:

Unmodified
Added
Removed
Modified
  • HowToTranslate

    v4 v5  
    1 == How-to translate GeoNetwork ? ==
     1== How-to translate GeoNetwork? ==
    22
    3 To make language change in your GeoNetwork, in fact, it's not difficult.
     3This how-to describes steps necessary to add a new language support into existing GeoNetwork installation.
     4
    45
    56=== Translation of the user interface ===
    67
    78All 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
    11 you 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
    13 base 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'
    22 Copy 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
    26 should add tags with new language's code and it's name. These string
    27 will be used by GeoNetwork to indicate current language in language
    28 switcher in interface. It's a little hard to explain, look at the
    29 example :
    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.
     9 * Create new record in `languages` table in your GeoNetwork's database.
     10 * In all tables which name ends with `Des` copy all entries marked `en`
     11   (or any other language) to entries with new language code.
     12   Then you will be able to edit these fields using Web-interface.
     13 * Copy folders (all paths listed from GeoNetwork's root folder) to folders
     14   with new language code. (You can use any language as base for translation, not only English.)
     15   User interface::
     16    * `web/geonetwork/loc/en`,
     17    * `web/intermap/loc/en`.
     18   Metadata standards::
     19    * `web/geonetwork/xml/schemas/dublin-core/loc/en`,
     20    * `web/geonetwork/xml/schemas/fgdc-std/loc/en`,
     21    * `web/geonetwork/xml/schemas/iso19115/loc/en`,
     22    * `web/geonetwork/xml/schemas/iso19139/loc/en`.
     23   Copy also profile specific folders if you're running sandboxes like Bluenet, GéoSource or geocat.ch.
     24   Then you should change copied values with translated strings, of course.
     25 * In ''all'' files `web/geonetwork/loc/`''<language code>''`/strings.xml`
     26   add tags with new language's code and it's name. These string will be
     27   used by GeoNetwork to indicate current language in interface switcher.
     28   For example, adding Russian language identified by `ru` in GeoNetwork,
     29   include into those files string `<ru>Русский</ru>`.
     30   Here `ru` is the code for Russian language and `Русский` is the Russian
     31   language name ''on Russian''.
    3432 * 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
    40 select="/root/gui/strings/en"/></font>
    41         </xsl:when>
    42         <xsl:otherwise>
    43             <a class="banner"
    44 href="{/root/gui/service}/en/main.home"><xsl:value-of
    45 select="/root/gui/strings/en"/></a>
    46         </xsl:otherwise>
    47     </xsl:choose>
    48 }}}
    49 Duplicate this fragment (separate new from old using '|') and 'en'
    50 to new language code.
    51 
    52 That's all!
     33   Open `web/geonetwork/xsl/banner.xsl` for editing and find this code:
     34   {{{
     35   <xsl:choose>
     36     <xsl:when test="/root/gui/language='en'">
     37       <font class="banner-active"><xsl:value-of select="/root/gui/strings/en"/></font>
     38     </xsl:when>
     39     <xsl:otherwise>
     40       <a class="banner" href="{/root/gui/service}/en/main.home"><xsl:value-of select="/root/gui/strings/en"/></a>
     41     </xsl:otherwise>
     42   </xsl:choose>
     43   }}}
     44   Duplicate this fragment (separating new from old using '|') and change `en` to the code of language you're adding.
    5345
    5446
    5547=== Propose your translation for integration into trunk ===
    56 2 options :
     48
     49You can choose one of these two ways:
    5750 * 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).
     51 * Create a ZIP archive with all needed files:
     52    * all `loc` directories,
     53    * localized database content (use [[http://druid.sourceforge.net/ Druid]] to export as DDF file tables which names ends with `Des`).
    6254
    6355Once done, send the translation to the devel mailing list and/or create a ticket on trac with files attached.
     
    6557
    6658=== Translate GAST ===
    67  * gast/data/gui_de.properties
    68  * src/org/fao/gast/localization/message_de.properties
     59
     60Files to localize:
     61 * `gast/data/gui_de.properties`
     62 * `src/org/fao/gast/localization/message_de.properties`
     63
    6964
    7065=== Translate the installer ===
    71  * Installer : packsLang.xml_deu
     66
     67The only file to localize is
     68 * `packsLang.xml_deu`
     69
    7270
    7371=== Translate the documentation ===
    74  * Translate documentation : docs/docbook/gn_manual_deu
    7572
    76 
    77 
    78 
     73Documentation is located in
     74 * `docs/docbook/gn_manual_deu`