This is a tool the provides access to the Fulcrum Localization component. This makes it easy to use the Localization Component. For more uses, you can also directly load up the component. See the LocalizationToolTest for sample code.
localizationTool = (LocalizationTool)context.get("l10n"); localizationTool.getString("DISPLAYPROJECTS_TITLE");
This is an example of using the localization pull tool.
This has the added effect of using the Accept-Language HTTP header to determine which language to display based on what setting the user has defined in the browser. Can you say Dynamic Localization? ;-)
For creating the file where you get the value of the String, please see the java.util.ListResourceBundle and java.util.ResourceBundle classes for more information. Jyve also contains example usage of this code because that was the first place where this code was originally developed.