[Ala-portal] How can I include <g:message..> in javascript

Santiago Martinez de la Riva sama at gbif.es
Tue Sep 23 11:02:49 CEST 2014

Hi all,

I'm trying to modify some javascript files to do the right internationation through the message.properties file, but I don't know how can I write this code <g:message.../> into the javascript code. For example:

If we have this javascript code:

    chartLabels: {
        institution_uid: 'institution',....


title: function () { return "By " + this.chartLabel();},.....


$container.append($('<h4>Explore records by Taxonomy</h4>'));

Is it possible include <g:message..> into this code, something like this:

$container.append($('<h4><g:message code='public.charts.taxomony.title'/></h4>'));

I've tried to do this but I obtain a javascript error.

Could someone teach me how can I do this?

Thanks in advance,

Santiago Martínez de la Riva
GBIF.ES, Unidad de Coordinación         Tel. +34 91 4203017 x 273
Real Jardín Botánico - CSIC                     Fax +34 91 429 2405
Plaza de Murillo, 2                                     sama at gbif.es
28014 Madrid, Spain                                 www.gbif.es

More information about the Ala-portal mailing list