AKSW / site.ontowiki

HTML Content Publishing system on top of Linked Data
6 stars 7 forks source link

Multi language support for Markdown #38

Open white-gecko opened 10 years ago

white-gecko commented 10 years ago

In RDF there is no possibility of specifying language tags for any datatype. So we have to find another way of specifying the language of a Markdown Literal [1]. There are three ways I can think of:

  1. Use the MultiMarkdown metadata syntax [2] and always read the value of “Language” (I got this hint from @cygri). Support for reading the header is implemented in 615b87c4d6acec5f005c726cb01499c18236f761 (resp. 4b312afd6f4416fd304df1ac8bda214d7e48d9a8).
  2. Define one datatype for each language e.g. http://ns.ontowiki.net/SysOnt/Markdown-ga, http://ns.ontowiki.net/SysOnt/Markdown-de, http://ns.ontowiki.net/SysOnt/Markdown-en, http://ns.ontowiki.net/SysOnt/Markdown-en-US, …
  3. Use structured values [3]. e.g.

    ex:document rdfs:comment
    [
     rdf:value "Das ist ein deutscher Text"^^sysont:Markdown ;
     language "de"
    ] , [
     rdf:value "This is a text in english"^^sysont:Markdown ;
     language "en"
    ] .

Where “language” should be an appropriate predicate and “"en"” could also be a URI, which identifies the language.

[1] http://ns.ontowiki.net/SysOnt/Markdown [2] https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide [3] http://www.w3.org/TR/rdf-syntax/#rdfvalue