Personal tools
You are here: Home administrator Exercises Changing some text on the homepage
Document Actions

Changing some text on the homepage

by Admin last modified 2006-12-07 00:48
All text that is part of the GeoNetwork opensource user interface is maintained in a set of XML files. These files can be localized to provide access to the site in several languages.

 

To see the localized files, open your file manager and go to the following location:

 <your geonetwork installation directory>\web\loc\

For each available language, you will find a two letter coded folder containing an image and an xml folder.

Open the strings.xml file in a text or XML editor. The strings.xml file contains most of the generic user interface text. Other files contain strings related to error messages, to metadata standards and some other stuff.
The structure of the files is relatively simple; each element has a logical name, e.g. <admin>, and contains the string to appear in the user interface. Logically, the \en\xml folder should contain XML files with English strings, while the fr folder should contain the same XML files, but now containing French strings and so on :-)
A nice feature of GeoNetwork opensource is that is has a default language, set to English. When viewing the website in another language, all strings that are not translated will be displayed in the default language. This ensures that no text disappears from the GUI.

Browse down through the file. You will run into e.g. the disclaimer1 and 2, header_meta and main_page elements.
When deploying GeoNetwork opensource on a corporate server, you will want to make sure these elements contain text that make sense to your organization. For now, we will only change some text in the main_page1 element.

Note that the structure of the XML file is very simple. The file starts with a root element, followed by elements containing strings. Elements can also contain HTML code or can contain attributes

Replace the HTML code inside the main_page1 element with something else. You can use the following if you want:

<H1>My GeoNetwork opensource node</H1>
<P>Use this node to find spatial data in the fisheries domain.</p>

Save the file and restart your Jetty server. The GeoNetwork opensource application has to by restarted for the changes to become visible
When re-started, open the GeoNetwork application in your web browser

You can further customize the GUI by adding new elements with text and changing the XSL stylesheets responsible for the page rendering, i.e. the main-page.xsl

Previous page - Index

Connect!

Users
Join the mailing list:
geonetwork-users
Browse the Archives

Developers
Join the mailing lists:
geonetwork-devel
geonetwork-commit
Browse the Archives
Goto the Developer website

Chat directly with
the experts on IRC:

#geonetwork
or on the web

Project of:
Open Source Geospatial Foundation

Software hosted at:
SourceForge.net Logo

Software metrics:

Log in


Forgot your password?
New user?
 

Creative Commons License
This work is licensed under a Creative Commons Attribution-No Derivative Works 3.0 Unported License.

Powered by Plone CMS, the Open Source Content Management System