⧼vector-jumptocontent⧽

Phrase Format: Difference between revisions

From EPrints Documentation
Moj (talk | contribs)
No edit summary
 
No edit summary
Line 1: Line 1:
Phrase files are stored in the repository's [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/lang/en/phrases|phrases]] directory, and follow a straightforward format. All of the phrase elements described by the file are contained within a single root phrases tag:
Phrase files are stored in the repository's [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/lang/en/phrases|phrases]] directory, and follow a straightforward format. All of the phrase elements described by the file are contained within a single root phrases tag:


  <epp:phrases xmlns="http://www.w3.org/1999/xhtml" xmlns:epp="http://eprints.org/ep3/phrase" xmlns:epc="http://eprints.org/ep3/control">
  <epp:phrases xmlns="http://www.w3.org/1999/xhtml"  
            xmlns:epp="http://eprints.org/ep3/phrase"  
            xmlns:epc="http://eprints.org/ep3/control">
   <epp:phrase id="myphrase">A phrase containing a <epc:pin name="mypin" /></epp:phrase>
   <epp:phrase id="myphrase">A phrase containing a <epc:pin name="mypin" /></epp:phrase>
  </epp:phrase>
  </epp:phrase>

Revision as of 16:25, 9 January 2007

Phrase files are stored in the repository's phrases directory, and follow a straightforward format. All of the phrase elements described by the file are contained within a single root phrases tag:

<epp:phrases xmlns="http://www.w3.org/1999/xhtml" 
           xmlns:epp="http://eprints.org/ep3/phrase" 
           xmlns:epc="http://eprints.org/ep3/control">
  <epp:phrase id="myphrase">A phrase containing a <epc:pin name="mypin" /></epp:phrase>
</epp:phrase>

The phrase element itself has an id attribute, which is used by the system to reference the phrase. One id matches one phrase - if a phrase is specified with an id that is already in use, the old phrase will be replaced. As such, the repository phrase files may override phrases from the system phrases.

EPrints Control elements may be used inside the phrase file - in this example a pin is used within the phrase, which is supplied when the phrase is rendered.