Configure a default LocaleHandler with the specified prefix.
434011
public void setLocalePrefix (final String prefix)
    {
        setLocaleHandler(
            new LocaleHandler() {
                public String getLocalePath (String path) {
                    return PathUtil.appendPath(prefix, path);
                }
            });
    }
1118950
def prefix_locale?(locale = Language.current.code)
      multi_language? && locale != ::I18n.default_locale.to_s
    end
46038
public void setLocale(final Locale locale) {
        if (!equals(this.locale, locale)) {
            this.locale = locale;
            super.setValue(toString(locale));
            i18nBundleProvider.reloadBundles(locale);
        }
    }
1205849
private void overrideLocalCanalConfig(String content) {

        try (OutputStreamWriter writer = new OutputStreamWriter(
            new FileOutputStream(CommonUtils.getConfPath() + "application.yml"),
            StandardCharsets.UTF_8)) {
            writer.write(content);
            writer.flush();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
926483
protected void resetLocalAddress(final Handler<AsyncResult<Boolean>> doneHandler) {
    localAddress = null;
    lastReset = System.currentTimeMillis();
    clusterLocator.locateCluster(address, new Handler<AsyncResult<String>>() {
      @Override
      public void handle(AsyncResult<String> result) {
        if (result.succeeded() && result.result() != null) {
          localAddress = result.result();
          new DefaultFutureResult<Boolean>(true).setHandler(doneHandler);
        } else {
          new DefaultFutureResult<Boolean>(false).setHandler(doneHandler);
        }
      }
    });
  }
1357334
def setup_prefix_suffix(self):
        

        self.compile_prefix = 'compile_'
        self.sourcepath_suffix = '_sourcepath'
        self.modpath_suffix = '_modpaths'
        self.targetpath_suffix = '_targetpaths'
78288
def putSubHandler(self, prefix, handler):
        '''
        '''
        self.subHandlers[prefix] = handler
        handler._parent = self
        return self
227659
public void addDefaultLocale(String localeName) {

        Locale locale = getLocale(localeName);
        if (!m_defaultLocales.contains(locale)) {
            m_defaultLocales.add(locale);
            if (CmsLog.INIT.isInfoEnabled()) {
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_I18N_CONFIG_DEFAULT_LOCALE_2,
                        new Integer(m_defaultLocales.size()),
                        locale));

            }
        }
    }
447935
public static void replaceDefaultHandler(Handler handler) {
    Logger rootlogger = LogManager.getLogManager().getLogger("");
    for(Handler h : rootlogger.getHandlers()) {
      if(h instanceof CLISmartHandler) {
        rootlogger.removeHandler(h);
      }
    }
    addHandler(handler);
  }
1118327
public void setDefault(E value, Locale locale) {
    set(value, locale);
    this.defaultLocale = locale;
  }
692674
private void overrideLocalCanalConfig(String content) {
        try (FileWriter writer = new FileWriter(CommonUtils.getConfPath() + "canal.properties")) {
            writer.write(content);
            writer.flush();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
1178662
def set_defaults(self, address):
        
        if address is not None:
            self.set_address(address)
        self.set_low_priority()
        self.set_no_rtr()
452706
private void installLocaleProvider() {
        LocaleProvider.setProvider(new LocaleProvider() {
            public Locale get() {
                Locale locale=null;
                StaplerRequest req = Stapler.getCurrentRequest();
                if(req!=null)
                    locale = req.getLocale();
                if(locale==null)
                    locale = Locale.getDefault();
                return locale;
            }
        });
    }
1171740
def add_prefix(prefix, s):
    ""
    # tokenize the XPath expression
    toks = xpath_lexer.scan(s)
    # add default prefix to unprefixed names
    toks2 = [_add_prefix(prefix, tok) for tok in toks]
    # build a string of the patched expression
    ls = [x.value for x in toks2]
    return ''.join(ls)
917015
public static void configureProtocolHandler() {
        final String pkgs = System.getProperty("java.protocol.handler.pkgs");
        String newValue = "org.mapfish.print.url";
        if (pkgs != null && !pkgs.contains(newValue)) {
            newValue = newValue + "|" + pkgs;
        } else if (pkgs != null) {
            newValue = pkgs;
        }
        System.setProperty("java.protocol.handler.pkgs", newValue);
    }
1064475
def __set_locals(self):
        

        for globals in (Constants, RuntimeGlobals, UiConstants):
            self.__locals[globals.__name__] = globals

        self.__locals[Constants.application_name] = self
        self.__locals["application"] = self
        self.__locals["patches_manager"] = self.__patches_manager
        self.__locals["components_manager"] = self.__components_manager
        self.__locals["actions_manager"] = self.__actions_manager
        self.__locals["file_system_events_manager"] = self.__file_system_events_manager
        self.__locals["notifications_manager"] = self.__notifications_manager
        self.__locals["layouts_manager"] = self.__layouts_manager
        self.__locals["LOGGER"] = LOGGER

        LOGGER.debug("> Defined locals: '{0}'.".format(self.__locals))
72302
def configure(self, config):
        """"""
        self._prefix_length = config.getint(
            'skip{suffix}'.format(suffix=self._option_suffix),
            fallback=self._prefix_length)