private function getAvailableLocales()
    {
        if (empty($this->availableLocales)) {
            // Open the pages directory.
            $pagesDirectory = opendir('../data/pages/');
            while ($directory = readdir($pagesDirectory)) {
                if (($directory != '.') && ($directory != '..')) {
                    $this->availableLocales[] = $directory;
                }
            }
            closedir($pagesDirectory);
        }

        return $this->availableLocales;
    }