code: public static String localizeString(String baseString) {
  
          if (baseString == null) {
              return null;
          }
          CmsWorkplaceMessages wpMessages = OpenCms.getWorkplaceManager().getMessages(A_CmsUI.get().getLocale());
          CmsMacroResolver resolver = new CmsMacroResolver();
          resolver.setMessages(wpMessages);
          String result = resolver.resolveMacros(baseString);
          return result;
      }
docs: Uses the currently set locale to resolve localization macros in the input string using workplace message bundles.<p>
  
  @param baseString the string to localize
  
  @return the localized string