code: public String translateResource(String resourceName) {
  
          if (m_translations.length == 0) {
              // no translations defined
              return resourceName;
          }
          if (resourceName == null) {
              return null;
          }
  
          StringBuffer result;
          String current = resourceName;
          int size = current.length() * 2;
  
          for (int i = 0; i < m_translations.length; i++) {
              result = new StringBuffer(size);
              try {
                  if (m_perlUtil.substitute(result, m_translations[i], current) != 0) {
  
                      if (m_continueMatching) {
                          // continue matching
                          current = result.toString();
                      } else {
                          // first pattern matched, return the result
                          if (LOG.isDebugEnabled()) {
                              LOG.debug(
                                  Messages.get().getBundle().key(
                                      Messages.LOG_TRANSLATION_MATCH_3,
                                      new Integer(i),
                                      resourceName,
                                      result));
                          }
                          // Return first match result
                          return result.toString();
                      }
                  }
              } catch (MalformedPerl5PatternException e) {
                  LOG.error(
                      Messages.get().getBundle().key(Messages.LOG_MALFORMED_TRANSLATION_RULE_1, m_translations[i]),
                      e);
              }
          }
  
          // the pattern matched, return the result
          if (LOG.isDebugEnabled()) {
              LOG.debug(Messages.get().getBundle().key(Messages.LOG_TRANSLATION_MATCH_2, resourceName, current));
          }
          // return last translation (or original if no matching translation found)
          return current;
      }
docs: Translate a resource name according to the expressions set in
  <code>opencms-vfs.xml</code>. If no match is found,
  the resource name is returned unchanged.<p>
  
  @param resourceName The resource name to translate
  @return The translated name of the resource