# SMS to R2RML does not retain language tag

**URL:** https://community.stardog.com/t/sms-to-r2rml-does-not-retain-language-tag/1981
**Category:** Support
**Created:** [October 4, 2019, 8:29pm UTC](https://community.stardog.com/t/sms-to-r2rml-does-not-retain-language-tag/1981 "2019-10-04T20:29:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)
#### Post date: [October 4, 2019, 8:29pm UTC](https://community.stardog.com/t/sms-to-r2rml-does-not-retain-language-tag/1981/1 "2019-10-04T20:29:46Z")

</div>

Stardog 7.0.2

Exporting an R2RML mapping that was loaded as SMS with a template that included a language tag does not include rr:language predicate.

SMS

`<{geonameid}> gn:alternateName "{\"alternatename\"}"@{isolanguage};`

R2RML

```
 <tag:stardog:api:mapping:generated:mapping-1302478374>
    a rr:TriplesMap ;
    rr:subjectMap [
        rr:template "http://sws.geonames.org/{geonameid}/" ;
            rr:termType rr:IRI
    ] ;
    rr:predicateObjectMap [
        rr:objectMap [
            rr:column "\"alternatename\"" ;
                rr:datatype <http://www.w3.org/2001/XMLSchema#string>
        ] ;
        rr:predicateMap [
            rr:constant gn:alternateName
        ]
    ] ;

```

Does R2RML even allow the language to be specified from a column? The specs say it must take a valid language tag but it doesn't say that it can be a template. Ugh, looks like that's not part of the spec. That’s a major oversight. The language tag is now trivial or useless. /rant

---

<div class="post-metadata">

### Author: ![PaulJackson](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pauljackson/32/243_2.png) [@PaulJackson](https://community.stardog.com/u/PaulJackson)
#### Post date: [October 7, 2019, 6:22pm UTC](https://community.stardog.com/t/sms-to-r2rml-does-not-retain-language-tag/1981/2 "2019-10-07T18:22:45Z")

</div>

This is a bug in the conversion process (#7936). The fix should be in the next release.

You're right that the R2RML spec doesn't support column-mapped language tags but we support it. You can change the R2RML by hand, for now, by adding an `rr:language` template:

```auto
    rr:predicateObjectMap [
        rr:objectMap [
            rr:column "\"alternatename\"" ;
            rr:language "{isolanguage}" ;
            rr:datatype <http://www.w3.org/2001/XMLSchema#string>

```

---

<div class="post-metadata">

### Author: ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)
#### Post date: [October 21, 2019, 6:22pm UTC](https://community.stardog.com/t/sms-to-r2rml-does-not-retain-language-tag/1981/3 "2019-10-21T18:22:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
