code: public static LocalizationContext getLocalizationContext(PageContext pc, String basename) {
  
          LocalizationContext locCtxt = null;
          ResourceBundle bundle = null;
  
          if ((basename == null) || basename.equals("")) {
              return new LocalizationContext();
          }
  
          // Try preferred locales
          Locale pref = getLocale(pc, javax.servlet.jsp.jstl.core.Config.FMT_LOCALE);
          if (pref != null) {
              // Preferred locale is application-based
              bundle = findMatch(basename, pref);
              if (bundle != null) {
                  locCtxt = new LocalizationContext(bundle, pref);
              }
          }
  
          if (locCtxt == null) {
              // No match found with preferred locales, try using fallback locale
              locCtxt = BundleSupport.getLocalizationContext(pc, basename);
          } else {
              // set response locale
              if (locCtxt.getLocale() != null) {
                  setResponseLocale(pc, locCtxt.getLocale());
              }
          }
  
          return locCtxt;
      }
docs: Returns the initialized localization context.<p>
  @param pc the current page context
  @param basename the bas name of the bundle
  
  @return the initialized localization context