20     private function __construct(
private string $locale) {
 
   40         if (!preg_match(
'~^[a-z0-9_]{2,20}$~', $locale)) {
 
   44         return new Locale($locale);
 
Indicated an invalid Locale was given.
 
Language class to ensure only valid languages are used.
 
static parse(string $locale)
Create a language, asserting that the language code is valid.
 
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.