From: Matthew B. <mat...@co...> - 2005-07-14 09:57:10
|
Alistair Young wrote: > yep, no way round that. literals are passed to Facility methods so I > can't pass a Localiser method call instead of a string. It has to be a > java.lang.String that gets passed to Facility. It's a fundamental i18n > limitation of bod. You need to recompile the template if you change a > Facility literal string in a properties file. For all other "normal" > content, i.e. content that the template class displays, you don't need > to recompile if you change the properties file. > Templates delegating content display to Facility causes the problem. The reason I orginally wrote the patch is I couldn't see any support for dynamically changing and I didn't look inside getCharacterData(). With my patch when you compile the call from default/applettop.html: <call> <target method="variable"><variable name="facility"/></target> <parameters> <variable name="request"/> <variable name="writer"/> <literal type="String"> <localise id="page.title.text"/> </literal> </parameters> </call> you get this in the Java: facility .variable( request , writer , res.getString("page.title.text") ); otherwise you get the hardcoded string. facility .variable( request , writer , "title" ); Is this better? -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |