Hi Reto
I tried our code with tsuy and hasan, but the code wouldn't work.
so we used the following function:
def returnLangValue(iter: CollectedIter[RichGraphNode], lang: Language) =
try {
if((iter).length > 0){
var nodeBuffer = new NodeBuffer;
for(item <- iter) yield {
ifx(item.getNode.asInstanceOf[PlainLiteral].getLanguage == lang) {
nodeBuffer :+ item*
item*
}
}
nodeBuffer.toSeq
} else {
""
}
} catch {case e:Exception => ""}
val lang = new Language(language)
that works very fine, if I wouldn't output the content in an html element:
<li class="tx-line">
<label for={PET_.title}>Title</label>
{returnLangValue(res/dct("title"), lang)} <!-- woks -->
<input type="text" id={PET_.title} name={PET_.title}
value={returnLangValue(res/dct("title"), lang)} /> <!-- works not (output is:
<input type="text" id="title" name="title" value= /> )
</li>
whats the problem and the solution ;-)
can you help me please ?
thanks
ol
--getunik ag-------------------------------------------
oliver straesser [email protected]
hardturmstrasse 101 fon: +41 (0)44 388 55 88
ch-8005 zuerich fax: +41 (0)44 388 55 89
--aktuelles getunik projekt-------------------------
Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne:
www.geomarketing.com
--best of swiss web awards 2009------------------
Gold & Silber für Connect2Earth / Bronze für WWF UK
we make the web a better place - www.getunik.com
*****************************************************************
Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
*****************************************************************
-----Ursprüngliche Nachricht-----
Von: Reto Bachmann-Gmuer [mailto:[email protected]]
Gesendet: Dienstag, 29. Juni 2010 20:46
An: [email protected]
Betreff: Re: Language in ssp
There's no specific support for this, but something like the following
should work
val lang = new Language("en")
(res/dct("title")).find(l
=>(l!).asInstanceOf[PlainLiteral].getLanguage == lang))
reto
On Mon, Jun 28, 2010 at 11:35 AM, Oliver Strässer
<[email protected]> wrote:
> is there a possibility to retrieve the specific language tagged literal in
> ssp?
>
> somthing like: res/dct("title" , "en")
>
> cheers oli
>
> --getunik ag-------------------------------------------
> oliver straesser
> [email protected]<mailto:[email protected]>
> hardturmstrasse 101 fon: +41 (0)44 388 55 88
> ch-8005 zuerich fax: +41 (0)44 388 55 89
>
> --aktuelles getunik projekt-------------------------
> Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne:
> www.geomarketing.com<http://www.geomarketing.com/>
>
> --best of swiss web awards 2009------------------
> Gold & Silber für Connect2Earth / Bronze für WWF UK
>
> we make the web a better place - www.getunik.com<http://www.getunik.com/>
>
>
>
>
> *****************************************************************
> P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es
> Ihnen.
> *****************************************************************
>
>