===== Install Messages ====== ==== Q: How do I install message bundles for use? ==== ~~SP~~~~SP~~ Depending on what you’re trying to accomplish, there are two ways you can install message bundles. Both methods require that you have one or more readable resource bundles (typically properties-based files). Currently you can read properties files on the file system or via any URL type supported by your Ant runtime. === Installing a single default or ‘fall back’ messages bundle === If you have a single messages bundle that you want all AntXtras-based components to use, installing a fall back messages bundle with **** is the most straightforward thing to do as shown in the next snippet. Note that there can be only //ONE// fall back messages bundle and you should install it before using any AntXtras component that uses messages. While you don’t have to uninstall a fall back bundle, you can by passing ‘uninstall-fallback’ as the action for the manage task as demonstrated below. [Declare your message bundle…] [Install your message bundle as default…] [Read messages using any bundle-enabled component…] [Read messages using the $message: funcut…] [If you have a "shutdown" include this…] :!: The big caveat with AntXtras messages is that in order to leverage the JRE’s automatic locale selection, you //must// refer to your bundles using a ‘resource’ parameter; files and URLs are loaded as generic resources //exactly as specified//. == == === Installing a messages bundle for a specific set of tasks === If you want to install a messages bundle for only a specific set of tasks (aka //a scoped configuration//) you need to use the ****[advanced antlib] taskset as shown in the snippet below. ... [...Other tasks to generate API documentation...] The configuration taskset is nestable, meaning you can nest one within another one (or more). Each newly nested taskset will use the nearest parent overlay as its default automatically //unless you tell it not to explicitly// by setting the ‘inheritance’ parameter to “off”. By turning inheritance off, you also stop AntXtras from using any installed fallback or parent message bundles. ... [...Generate other documentation...] == == === Related Tips === * [[enablefuncuts|How do I enable or disable function shortcuts?]] ~~UP~~