8.4.2 How to get all locales with locale root paths?
Permalink
How do I get all locales and their respective root paths?
e.g.
http://site.com/
http://site.com/ru/
I tried
but it throws an error:
"Too few arguments to function Concrete\Core\Entity\Site\Site::__construct(), 0 passed in /srv/www/htdocs/SITE/packages/PACKAGE/controllers/single_page/dashboard/PAGE/settings.php on line 54 and exactly 1 expected"
Also tried this
which throws "Using $this when not in object context"
e.g.
http://site.com/
http://site.com/ru/
I tried
use \Concrete\Core\Entity\Site\Site as Site; $site = new Site(); $this->set('locales', $site->getLocales());
but it throws an error:
"Too few arguments to function Concrete\Core\Entity\Site\Site::__construct(), 0 passed in /srv/www/htdocs/SITE/packages/PACKAGE/controllers/single_page/dashboard/PAGE/settings.php on line 54 and exactly 1 expected"
Also tried this
$this->set('locales', \Concrete\Core\Entity\Site\Site::getLocales());
which throws "Using $this when not in object context"