If you’re looking for locale globalization in your building blocks then you need to use bundles. Bundles allow you to create property files for each language and then used them throughout your application.
There is a B2Context jar file developed by Stephen Vickers that allows you to easily get the correct language property file and then import it into the pageContext for parsing in your jsp file. But rather than waste time trying to figure it all that out, just look how Michael Fudge does it in the B2 Starter Kit.
Since the locales set is captured by the clients browser it’s good to know your audience. So here is a list of locales you might expect to see coming in, so that you can name your properties correctly that reside in the WEB-INF/bundles directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
### B2-StarterKit\WebContent\WEB-INF\bundles\bb-manifest-en_US.properties ### ### the location matters ^^ it needs to be in WEB-INF\bundles\ and the name matters too ... ### for example en_US is english and is likely the default bundle ### but the default depends on global Blackboard system settings ### it could very well be the fr_FR if the Blackboard environment is at a French university
... page.system.formdemo.title=B2SK - Example Form Processing Demo page.system.formdemo.breadcrumb= Form Demo page.system.formdemo.instructions=This example demonstrates basic form processing the contents of the form are echoed back to the browser. page.system.formdemo.step.title=Form Data page.system.formdemo.step.instructions=Please fill in this form. page.system.formdemo.label.demoTextelement=demoTextelement: page.system.formdemo.label.demoRadio=demoRadio: page.system.formdemo.label.demoCheckbox=demoCheckbox page.system.formdemo.label.demoSelect=demoSelect: page.system.formdemo.label.demoDatepicker=demoDatepicker: