/**
  * Set the reading language, either namespaced to 'site' (website content)
  * or 'cms' (management backend). This value is used in {@link augmentSQL()}
  * to "auto-filter" all SELECT queries by this language.
  * See {@link disable_locale_filter()} on how to override this behaviour temporarily.
  * 
  * @param string $lang New reading language.
  */
 static function set_current_locale($locale)
 {
     if ($locale && !i18n::validate_locale($locale)) {
         throw new InvalidArgumentException(sprintf('Invalid locale "%s"', $locale));
     }
     self::$current_locale = $locale;
 }
Beispiel #2
0
 /**
  * Set the reading language, either namespaced to 'site' (website content)
  * or 'cms' (management backend). This value is used in {@link augmentSQL()}
  * to "auto-filter" all SELECT queries by this language.
  * See {@link $enable_lang_filter} on how to override this behaviour temporarily.
  * 
  * @param string $lang New reading language.
  */
 static function set_current_locale($locale)
 {
     self::$current_locale = $locale;
 }