Sets the currently edited locale.
@param locale the locale to set.
16008
void setLanguage(final Locale locale) {

        if (!m_languageSelect.getValue().equals(locale)) {
            m_languageSelect.setValue(locale);
        }
    }
473202
public function setLocale($locale)
    {
        if (!isset($this->localePreference[$locale])) {
            $localeBase = substr($locale, 0, 2);

            // Strip region from locale if not configured
            if (empty($this->localePreference[$localeBase])) {
                throw new MissingTranslationException(
                    "The locale '$locale' is not present in the list of available locales"
                );
            }

            $locale = $localeBase;
        }

        $this->locale = $locale;
    }
1032518
def setCurrentLocale(self, locale):
        
        locale = str(locale)
        for i in xrange(self.count()):
            if self.itemData(i) == locale:
                self.setCurrentIndex(i)
                return True
        return False
836066
@Override
    public void setLocale(Locale inLocale) {
        if (isCommitted() || null == inLocale) {
            return;
        }
        this.locale = inLocale;
        if (null != this.outWriter || null != this.encoding) {
            return;
        }
        EncodingUtils encodingUtils = connection.getEncodingUtils();
        this.encoding = encodingUtils.getEncodingFromLocale(inLocale);
        if (null == this.encoding) {
            this.encoding = encodingUtils.getDefaultEncoding();
        }
        if (null != this.contentType) {
            int index = this.contentType.indexOf("charset=");
            StringBuilder sb = new StringBuilder();
            if (-1 != index) {
                sb.append(this.contentType.substring(0, index - 1).trim());
            }
            if (this.encoding != null) {
                sb.append(";charset=").append(this.encoding);
            }

            this.response.setHeader("Content-Type", sb.toString());
        }
    }
863167
void setLocale(Locale locale)
   {
      m_resourceNames = LocaleData.getStringArray(locale, LocaleData.RESOURCE_NAMES);

      String name;
      m_resourceNumbers.clear();

      for (int loop = 0; loop < m_resourceNames.length; loop++)
      {
         name = m_resourceNames[loop];
         if (name != null)
         {
            m_resourceNumbers.put(name, Integer.valueOf(loop));
         }
      }
   }
1217995
public void setLocale(Locale locale)
  {
    if(locale != null && report != null && report instanceof LocalizableReport) 
    {
      ((LocalizableReport) report).setLocale(locale); 
    }
  }
437586
public void setLocale(Locale locale) {

        getStateHelper().put(PropertyKeys.locale, locale);
        // Make sure to appraise the EL of this switch in Locale.
        FacesContext.getCurrentInstance().getELContext().setLocale(locale);

    }
138023
public function setLocale($locale) {
        $this->locale   = $locale;
        $this->language = substr($locale, 0, (strpos($locale, '-')));
        $this->messages = array();
    }
993847
public static void setLocale(Locale locale) {
        if (RepositoryUtils.locale == null) {
            RepositoryUtils.locale = locale;
        } else {
            if (RepositoryUtils.locale != locale) {
                RepositoryUtils.locale = locale;
                messages = null;
                installMessages = null;
            }
        }
    }
591944
public function setLocale($locale)
    {
        if ($locale instanceof Locale) {
            $this->locale = $locale;
            return $this;
        }
        $this->locale = strtolower($locale);
        return $this;
    }
1118327
public void setDefault(E value, Locale locale) {
    set(value, locale);
    this.defaultLocale = locale;
  }
643327
public void setContentLanguage(Locale locale) {
		checkCommitted();
		ContentLanguageHeader contentLanguageHeader =
			SipFactoryImpl.headerFactory.createContentLanguageHeader(locale);
		this.message.setContentLanguage(contentLanguageHeader);
	}
506940
public final Locale setLocale(Locale loc)
    {
        if (sealed) onSealedMutation();
        Locale result = locale;
        locale = loc;
        return result;
    }
781840
public static void setLocale(Locale l) throws IllegalArgumentException {

        synchronized (mutex) {
            if (l == null) {
                throw new IllegalArgumentException("null locale");
            }

            locale = l;
        }
    }
791842
public function setLocale($locale = null)
    {
        if (is_null($locale)) {
            $locale = $this->getParent()->getLocale();
        }
        $this->locale = $locale;

        return $this;
    }
637967
void setLocale(Locale locale)
   {
      m_taskNames = LocaleData.getStringArray(locale, LocaleData.TASK_NAMES);

      String name;
      m_taskNumbers.clear();

      for (int loop = 0; loop < m_taskNames.length; loop++)
      {
         name = m_taskNames[loop];

         if (name != null)
         {
            m_taskNumbers.put(name, Integer.valueOf(loop));
         }
      }
   }
1295467
private function setLocale($locale)
    {
        if($locale != null)
        {
            \Locale::setDefault($locale);
        }
        else 
        {
           \Locale::setDefault(self::CURRENCY_DEFAULT_LOCALE); 
        }
        
        $this->locale = \Locale::getDefault();
    }