Version 4 (modified by 16 years ago) ( diff ) | ,
---|
How-to translate GeoNetwork ?
To make language change in your GeoNetwork, in fact, it's not difficult.
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 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 profil 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' you
should add tags with new language's code and it's name. These string will be used by GeoNetwork to indicate current language in language switcher in interface. It's a little hard to explain, look at the example :
Adding Russian language identified by 'ru' in my GeoNetwork, so add string
<ru>Русский</ru>
in all that files, where 'ru' is Russian language code and
'Русский' is 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 (separate new from old using '|') and 'en' to new language code.
That's all!
Propose your translation for integration into trunk
2 options :
- Create a patch if your are familiar with SVN.
- Create a zip with all needed files :
- Zip all loc directories.
- For database content, use http://druid.sourceforge.net/ Druid to export tables which name ends with 'Des'.
- export as Druid format (ddf).
Once done, send the translation to the devel mailing list and/or create a ticket on trac with files attached.
Translate GAST
- gast/data/gui_de.properties
- src/org/fao/gast/localization/message_de.properties
Translate the installer
- Installer : packsLang.xml_deu
Translate the documentation
- Translate documentation : docs/docbook/gn_manual_deu