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 |
| 7 | All 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. |
| 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 |
| 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! |
| 53 | |
| 54 | |
| 55 | === Propose your translation for integration into trunk === |
| 56 | 2 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 | |
| 63 | Once 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 === |