Index: mod/glossary/lib.php
===================================================================
--- mod/glossary/lib.php	(revision 5617)
+++ mod/glossary/lib.php	(revision 5636)
@@ -2256,4 +2256,90 @@
     return array('moodle/site:accessallgroups', 'moodle/site:viewfullnames', 'moodle/site:trustcontent');
 }
 
+/**
+ * Grab concept string
+ * 
+ * @param $displayformat
+ * @return string
+ */
+function glossary_get_concept_string($displayformat  = -1) {
+    
+    global $CFG;
+
+    // path to formatfile
+    $formatfile = $CFG->dirroot.'/mod/glossary/formats/'.$displayformat.'/'.$displayformat.'_format.php';
+    
+    $functionname = 'glossary_get_concept_string_'.$displayformat;
+
+    // make sure file is there before trying to include it
+    if (file_exists($formatfile)) {
+        
+        // include this file
+        include_once($formatfile);
+        
+        // if function exists in format file, use it
+        if (function_exists($functionname)) {
+            
+            $string = $functionname();
+            
+        } else {
+            
+            // If the glossary_get_concept_string_XXXX function doesn't exist,
+            // use the value from the lang file
+            $string = get_string('concept', 'glossary');
+        }
+        
+    // if file is not there, use default string
+    } else {
+        
+        // use default from lang file
+        $string = get_string('concept', 'glossary');
+    }
+    
+    return $string;
+}
+
+/**
+ * Grab definition string
+ * 
+ * @param $displayformat
+ * @return string
+ */
+function glossary_get_definition_string($displayformat  = -1) {
+    
+    global $CFG;
+
+    // path to formatfile
+    $formatfile = $CFG->dirroot.'/mod/glossary/formats/'.$displayformat.'/'.$displayformat.'_format.php';
+    
+    $functionname = 'glossary_get_definition_string_'.$displayformat;
+
+    // make sure file is there before trying to include it
+    if (file_exists($formatfile)) {
+        
+        // include this file
+        include_once($formatfile);
+        
+        // if function exists in format file, use it
+        if (function_exists($functionname)) {
+            
+            $string = $functionname();
+            
+        } else {
+            
+            // If the glossary_get_definition_string_XXXX function doesn't exist,
+            // use the value from the lang file
+            $string = get_string('concept', 'glossary');
+        }
+        
+    // if file is not there, use default string
+    } else {
+        
+        // use default from lang file
+        $string = get_string('concept', 'glossary');
+    }
+    
+    return $string;
+}
+
 ?>
Index: mod/glossary/edit_form.php
===================================================================
--- mod/glossary/edit_form.php	(revision 5617)
+++ mod/glossary/edit_form.php	(revision 5636)
@@ -1,6 +1,8 @@
 <?php // $Id: edit_form.php,v 1.7.2.1 2007/11/23 22:12:38 skodak Exp $
 require_once ($CFG->dirroot.'/lib/formslib.php');
 
+require_once ($CFG->dirroot . '/mod/glossary/lib.php');
+
 class mod_glossary_entry_form extends moodleform {
 
     function definition() {
@@ -15,13 +17,16 @@
         $e        =& $this->_customdata['e'];
 
 //-------------------------------------------------------------------------------
+        $concept    = glossary_get_concept_string($glossary->displayformat);
+        $definition = glossary_get_definition_string($glossary->displayformat);
+        
         $mform->addElement('header', 'general', get_string('general', 'form'));
 
-        $mform->addElement('text', 'concept', get_string('concept', 'glossary'));
+        $mform->addElement('text', 'concept', $concept);
         $mform->setType('concept', PARAM_TEXT);
         $mform->addRule('concept', null, 'required', null, 'client');
 
-        $mform->addElement('htmleditor', 'definition', get_string('definition', 'glossary'), array('rows'=>20));
+        $mform->addElement('htmleditor', 'definition', $definition, array('rows'=>20));
         $mform->setType('definition', PARAM_RAW);
         $mform->addRule('definition', null, 'required', null, 'client');
         $mform->setHelpButton('definition', array('writing', 'richtext'), false, 'editorhelpbutton');
Index: mod/glossary/formats/encyclopedia/encyclopedia_format.php
===================================================================
--- mod/glossary/formats/encyclopedia/encyclopedia_format.php	(revision 5617)
+++ mod/glossary/formats/encyclopedia/encyclopedia_format.php	(revision 5636)
@@ -81,5 +81,24 @@
     return glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
 
 }
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_encyclopedia() {
+    
+    return get_string('concept', 'glossary');
+}
 
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_encyclopedia() {
+    
+    return get_string('definition', 'glossary');
+}
+
 ?>
Index: mod/glossary/formats/fullwithauthor/fullwithauthor_format.php
===================================================================
--- mod/glossary/formats/fullwithauthor/fullwithauthor_format.php	(revision 5617)
+++ mod/glossary/formats/fullwithauthor/fullwithauthor_format.php	(revision 5636)
@@ -72,4 +72,24 @@
 
 }
 
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_fullwithauthor() {
+    
+    return get_string('concept', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_fullwithauthor() {
+    
+    return get_string('definition', 'glossary');
+}
+
 ?>
Index: mod/glossary/formats/dictionary/dictionary_format.php
===================================================================
--- mod/glossary/formats/dictionary/dictionary_format.php	(revision 5617)
+++ mod/glossary/formats/dictionary/dictionary_format.php	(revision 5636)
@@ -34,4 +34,23 @@
     return glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
 }
 
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_dictionary() {
+    
+    return get_string('concept', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_dictionary() {
+    
+    return get_string('definition', 'glossary');
+}
 ?>
Index: mod/glossary/formats/continuous/continuous_format.php
===================================================================
--- mod/glossary/formats/continuous/continuous_format.php	(revision 5617)
+++ mod/glossary/formats/continuous/continuous_format.php	(revision 5636)
@@ -37,4 +37,24 @@
     
 }
 
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_continuous() {
+    
+    return get_string('concept', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_continuous() {
+    
+    return get_string('definition', 'glossary');
+}
+
 ?>
Index: mod/glossary/formats/faq/faq_format.php
===================================================================
--- mod/glossary/formats/faq/faq_format.php	(revision 5617)
+++ mod/glossary/formats/faq/faq_format.php	(revision 5636)
@@ -57,4 +57,25 @@
 
 }
 
+
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_faq() {
+    
+    return get_string('question', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_faq() {
+    
+    return get_string('answer', 'glossary');
+}
+
 ?>
Index: mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php
===================================================================
--- mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php	(revision 5617)
+++ mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php	(revision 5636)
@@ -58,4 +58,24 @@
 
 }
 
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_fullwithoutauthor() {
+    
+    return get_string('concept', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_fullwithoutauthor() {
+    
+    return get_string('definition', 'glossary');
+}
+
 ?>
Index: mod/glossary/formats/TEMPLATE/TEMPLATE_format.php
===================================================================
--- mod/glossary/formats/TEMPLATE/TEMPLATE_format.php	(revision 5617)
+++ mod/glossary/formats/TEMPLATE/TEMPLATE_format.php	(revision 5636)
@@ -120,4 +120,25 @@
 
 }
 
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_TEMPLATE() {
+    
+    return get_string('concept', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_TEMPLATE() {
+    
+    return get_string('definition', 'glossary');
+}
+
+
 ?>
Index: mod/glossary/formats/entrylist/entrylist_format.php
===================================================================
--- mod/glossary/formats/entrylist/entrylist_format.php	(revision 5617)
+++ mod/glossary/formats/entrylist/entrylist_format.php	(revision 5636)
@@ -60,4 +60,25 @@
     return $return;
 }
 
+
+/**
+ * Return format-specific lang file string for concept field
+ * 
+ * @return string
+ */
+function glossary_get_concept_string_entrylist() {
+    
+    return get_string('concept', 'glossary');
+}
+
+/**
+ * Return format-specific lang file string for definition field
+ * 
+ * @return string
+ */
+function glossary_get_definition_string_entrylist() {
+    
+    return get_string('definition', 'glossary');
+}
+
 ?>
