Last modified: 2013-07-03 13:16:31 UTC
Let's say Q5 has property P11 which refers to Q23; Q5 is linked to local page [[Foo]] and has label "Foo", and Q23 is linked to local page [[The Thing (movie)]] and has label "The Thing". Then, when using {{#property:P11}} on the page [[Foo]], the result should be The Thing (movie), not just The Thing, so this can be used as a link. Perhaps this should be optional: return labels, return titles, or return full links (using titles as the target and labels as the link text). It might be sufficient to cover this with Lua, but as far as I'm aware, this isn't currently possible with Lua either.
It's also necessary to handle the case where there is no sitelink for that language.
According to the documentation, you can use the Page function to access the sitelink. Described here: <http://www.mediawiki.org/wiki/Extension:WikibaseClient/Lua>
https://test2.wikipedia.org/wiki/Atlanta for example works, creating a link like [[Georgia (U.S. state)|Georgia]] with lua.