From: Alistair Y. <ali...@sm...> - 2005-07-15 10:58:20
|
> there should be one single generic set of > templates that dynamically pull in the resource bundles at run-time there's only one set of templates for all languages and compiling them at build time tells you they're valid xml etc. The template *class* is language specific in that it has a pointer to a language specific Localiser, to get it's strings. Bod isn't ever in "one" language, it can be in hundreds at the same time. You can have French, Italian, Russian, Gaelic users all using the same bod and all seeing the templates in their own language. At the time there were two options to do this: 1 - have a language specific resource url - wouldn't work for tracking etc. (you haven't viewed your document, yes I have, I viewed the Russian one) 2 - have a language specific template class and have the template compile= r return that. Now that I know more about the gloabl soup of bod I could perhaps do away with language specific template classes and write logic into the template class to get the current user, get their language and grab an instance of a Localiser for that language. It then comes down to performance. Either XmlTemplate "redirects" to the language specifc template class, as it does just now, or the template class itself works out which language it should work in. I'd be interested to hear your opinion on all this Alexis as you know a lot more about the bod guts than me (thank goodness!) Alistair --=20 Alistair Young Senior Software Engineer UHI@Sabhal M=F2r Ostaig Isle of Skye Scotland > Alistair Young wrote: >> Thanks Alexis. >> >> I'm not sure what you mean by language agnostic. Bod is now an i18n >> application so the template compiler must be language aware. By that I >> mean the compiler has to know which language variant to build. >> > > Ok, it's not *really* that much of a problem, but you've drawn me, so I > shall respond ;-). > > I think the fact that templates for different languages get compiled is > inherently duff. Conceptually, there should be one single generic set o= f > templates that dynamically pull in the resource bundles at run-time. > When you compile the templates stand-alone, you're really just wanting > to see that their valid (i.e. are valid XML and can compile into java). > The available languages should be neither here nor there. The current > situtation implies that you need to seperately compile the templates fo= r > all the languages that you know about. > > As I say, no need for anyone to get upset ;-). > > Alexis > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dcl= ick > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |