code: final protected String localizeString(String input)
      {
          if (input == null || !input.startsWith("%") || !input.endsWith("%"))
              return input;
          String bundleName = input.substring(1, input.length()-1);
          String resourceName = null;
          int lastDot = bundleName.lastIndexOf('.');
          while (lastDot != -1 && lastDot != 0 && (lastDot+1 < bundleName.length()))
          {
              // move last element from bundle to resource.  foo.bar.Baz could be the 
              // Baz property in foo.bar, or the bar.Baz property in foo.
              if (resourceName == null)
                  resourceName = bundleName.substring(lastDot+1);
              else
                  resourceName = bundleName.substring(lastDot+1) + '.' + resourceName;
              bundleName = bundleName.substring(0, lastDot);
  
              try
              {            
                  ResourceBundle bundle = ResourceBundle.getBundle(bundleName, Locale.getDefault(), 
                                                                   _beanClass.getClassLoader());
                  if (bundle != null)
                  {
                      String lookup = bundle.getString(resourceName);
                      if (lookup != null)
                          return lookup;
                  }
              }
              catch (MissingResourceException mre)
              { }
                  
              lastDot = bundleName.lastIndexOf('.');
          }
  
          return input;
      }
docs: /*
  Gets a possibly-localized string for the given input string.
  @param input This the the string that may be localizable.  If it is of the form
  "%foo.bar.Baz%", then the resource Baz will be looked up in the foo.bar bundle using
  standard ResourceBundle rules for the default Locale using the control's classloader.
  If the input does not start and end with '%', or if the bundle is not located, the string
  will be returned verbatim.
  @return the string to be displayed, or the input string if no resource is found.