Search code examples
wicketwicket-1.6wicket-6

Wicket localized value in data-original-title


Is it possible to plave value from properties file into tag parameter with wicket:message without using java. For example i have the following element <i class="ico ico-filter-code" data-toggle="tooltip" data-placement="top" title="" data-original-title="Sime title from properties file"></i>

Any suggestions?


Solution

  • (In case the links die, here a full blown answer, rep should go to bert as his first comment is corrert :) )

    You should use wicket:message For example:

    <input
      type="submit"
      wicket:message="name:InputName,title:InputTitle"
    />
    

    Will end up as:

    <input type="submit" name="..." title="..."> 
    

    Where the dots are filled from the propertyFile.

    See also the Wicket documentation on i18n