docs: private static PolicyDefinitionTemplateBean getTemplateBean(PolicyDefinitionBean def) {
          Locale currentLocale = Messages.i18n.getLocale();
          String lang = currentLocale.getLanguage();
          String country = lang + "_" + currentLocale.getCountry(); //$NON-NLS-1$
  
          PolicyDefinitionTemplateBean nullBean = null;
          PolicyDefinitionTemplateBean langBean = null;
          PolicyDefinitionTemplateBean countryBean = null;
          for (PolicyDefinitionTemplateBean pdtb : def.getTemplates()) {
              if (pdtb.getLanguage() == null) {
                  nullBean = pdtb;
              } else if (pdtb.getLanguage().equals(country)) {
                  countryBean = pdtb;
                  break;
              } else if (pdtb.getLanguage().equals(lang)) {
                  langBean = pdtb;
              }
          }
          if (countryBean != null) {
              return countryBean;
          }
          if (langBean != null) {
              return langBean;
          }
          if (nullBean != null) {
              return nullBean;
          }
          return null;
      }