Changeset 6674


Ignore:
Timestamp:
2004-01-30T11:36:11+13:00 (20 years ago)
Author:
jmt12
Message:

A slightly revised version with some concrete examples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/metadata/adding_translations.txt

    r6644 r6674  
    551. Prepare your source text in a UTF8 encoded document, or use a fully Unicode compliant text editor. Open the metadata set file that you want to edit.
    66
     7Example: To add a new language to the dublin.mds, open the file in a UTF8 editor.
     8
    792. In MetadataSet DOM element edit, or add if necessary, an argument named "language_dependent". As its value add a list of comma separated attribute names. These are the names of the attributes which are taken to be language dependent (see 4).
     10
     11Example: While editing the dublin.mds scroll down to the start of the MetadataSet xml block, which looks like:
     12
     13<MetadataSet
     14  contact     = "[email protected]"
     15  creator     = "Dublin Core Metadata Initiative"
     16  family      = "Dublin Core"
     17  lastchanged = "Tue Jun 04 10:35:30 2002 - jmt12 on blackbird"
     18  namespace   = "dc"
     19>
     20
     21and add the mentioned line so it reads something like:
     22
     23<MetadataSet
     24  contact     = "[email protected]"
     25  creator     = "Dublin Core Metadata Initiative"
     26  family      = "Dublin Core"
     27  lastchanged = "Tue Jun 04 10:35:30 2002 - jmt12 on blackbird"
     28  namespace   = "dc"
     29  language_dependent = "identifier, definition, comment"
     30>
     31
     32where identifier, definition and command are the attributes that we wish to be language specific.
    833
    9343. Near the top of the document add a language specific set description block of the form
     
    1641  Replace the ** with the relevant detail. Code is the two letter language code according to ISO 3166.
    1742
    18 4. For each Element defined in the metadata set, add a new Language block and within it add the language specfic Attributes. The block is of the form:
     43Example: To add the French translation to the dublin.mds scroll down to just below the MetadataSet xml block, and add the SetLanguage xml block:
     44
     45  <SetLanguage code="fr">
     46    <Name language="fr">El\303\251ments de m\303\251tadonn\303\251es du Dublin Core, Version 1.1: Description de R\303\251ference</Name>
     47    <Description language="fr">Ce document r\303\251sume...</Description>
     48  </SetLanguage>
     49
     504. For each Element xml block defined in the metadata set, add a new Language xml block and within it add the language specfic Attributes. The block is of the form:
    1951
    2052    <Language code="**">
     
    2557  Replace the ** with the relevant detail. Once again code is the two letter language code according to ISO 3166. Note that the names specified in the name argument of an Attribute must also be listed in the language_dependent argument of the MetadataSet (see 1)
    2658
     59Example: Thus to add a French translation for the Element "Title", scroll down to the Element xml block defining Title. This should start:
     60
     61  <Element name="Title" remember_values="true">
     62  ...
     63  ...
     64  ...
     65  </Element>
     66
     67Now add in a new Language block so it looks something like this:
     68
     69  <Element name="Title" remember_values="true">
     70  ...
     71     <!-- French -->
     72     <Language code="fr">
     73        <Attribute name="identifier">Titre</Attribute>
     74        <Attribute name="definition">Le nom donn\303\251 \303\240  la ressource.</Attribute>
     75        <Attribute name="comment">Typiquement, un titre sera le nom par lequel la ressource est officiellement connue.</Attribute>
     76     </Language>
     77  ...
     78  </Element>   
     79
    27805. Finally edit the file <gli_install>/classes/xml/languages.xml. Locate the appropriate Language and add the argument mds="true" to enable this language. This controls what languages appear on the preferences page within the GLI.
     81
     82Example: Finally to enable the French translation, find the entry in the languages.xml file that reads:
     83
     84  <Language name="FRENCH"              code="FR" ... >ROMANCE</Language>
     85
     86And change it so it now says:
     87
     88  <Language name="FRENCH"              code="FR" ... mds="true">ROMANCE</Language>
Note: See TracChangeset for help on using the changeset viewer.