| 1 | = Proposal number : Multilingual metadata support = |
| 2 | |
| 3 | || '''Date''' || 2008/08/08 || |
| 4 | || '''Contact(s)''' || francois || |
| 5 | || '''Last edited''' || [[Timestamp]] || |
| 6 | || '''Status''' || being discussed || |
| 7 | || '''Assigned to release''' || Release number, to be determined || |
| 8 | || '''Resources''' || || |
| 9 | |
| 10 | == Overview == |
| 11 | |
| 12 | All gco:CharacterString elements could be multilingual. |
| 13 | allow multilingual editing |
| 14 | |
| 15 | == Proposal type: == |
| 16 | * Type: Editor |
| 17 | * App: GeoNetwork |
| 18 | * Module: SchemaLoader |
| 19 | == Links: == |
| 20 | |
| 21 | == Proposal: == |
| 22 | |
| 23 | Metadata is defined by one main language (gmd:MD_Metadata/gmd:language:gco:CharacterString) and other locale (gmd:MD_Metadata/gmd:locale/*). |
| 24 | |
| 25 | If user add new translation, a new local element has to be added: |
| 26 | <locale> |
| 27 | <gmd:PT_Locale id="FR"> |
| 28 | <gmd:languageCode><gmd:LanguageCode codeList="#LanguageCode" codeListValue="fra">French</gmd:LanguageCode></gmd:languageCode> |
| 29 | <gmd:characterEncoding><gmd:MD_CharacterSetCode codeList="#MD_CharacterSetCode" codeListValue="utf8">UTF 8</gmd:MD_CharacterSetCode></gmd:characterEncoding> |
| 30 | </gmd:PT_Locale> |
| 31 | </locale> |
| 32 | |
| 33 | |
| 34 | Configuration need to set the available languages the editor could use using a list of iso code. |
| 35 | |
| 36 | After editing, the new translated element is stored with: |
| 37 | an xsi:type= « gmd:PT_FreeText_PropertyType» |
| 38 | a first gco:CharacterString in the metadata language (in the example en) |
| 39 | n gmd:PT_FreeText elements with each translation |
| 40 | {{{ |
| 41 | <scope xsi:type="gmd:PT_FreeText_PropertyType"> |
| 42 | <gco:CharacterString>Codelists for description of metadata datasets compliant with ISO/TC 211 19115:2003 and 19139</gco:CharacterString> |
| 43 | <gmd:PT_FreeText> |
| 44 | <gmd:textGroup> |
| 45 | <gmd:LocalisedCharacterString locale="#FR ">Listes de codes pour la description de lots de métadonnées conforme ISO TC/211 19115:2003 et 19139</gmd:LocalisedCharacterString> |
| 46 | </gmd:textGroup> |
| 47 | </gmd:PT_FreeText> |
| 48 | </scope> |
| 49 | }}} |
| 50 | |
| 51 | |
| 52 | SchemaLoader should be able to register complexType which are extension based on a PropertyType (and not only a Type). For example : |
| 53 | {{{ |
| 54 | <xs:complexType name="PT_FreeText_PropertyType"> |
| 55 | <xs:complexContent> |
| 56 | <xs:extension base="gco:CharacterString_PropertyType"> |
| 57 | }}} |
| 58 | |
| 59 | Then the metadocument should add for all elements which are of type gco:CharacterString_PropertyType an xsi:type option with the list of type available. |
| 60 | |
| 61 | {{{ |
| 62 | <xs:element name="title" type="gco:CharacterString_PropertyType"/> |
| 63 | }}} |
| 64 | |
| 65 | For title which is a gco:CharacterString_PropertyType, xsi:type could be : |
| 66 | * gco:CharacterString_PropertyType |
| 67 | * gmd:PT_FreeText_PropertyType |
| 68 | Then if an xsi:type="gmd:PT_FreeText_PropertyType" the element is edited in multilingual. |
| 69 | |
| 70 | Via schema_suggestion, the editor will define if one element should be « suggested » as multilingual or not and which languages to suggest. |
| 71 | {{{ |
| 72 | <field name="gmd:title"> |
| 73 | <suggest name="xsi:type" value="gmd:PT_FreeText_PropertyType"> |
| 74 | <lang value= « eng »/> |
| 75 | <lang value= « fra »/> |
| 76 | <lang value= « deu »/> |
| 77 | <lang value= « ita »/> |
| 78 | </suggest> |
| 79 | </field> |
| 80 | }}} |
| 81 | |
| 82 | Then the editor will suggest multilingual editing interface. |