public function translatedLanguages($onlyPublished = false)
    {
        $filename = substr($this->name, 0, -(strlen($this->extension())));
        $config = Grav::instance()['config'];
        $languages = $config->get('system.languages.supported', []);
        $translatedLanguages = [];

        foreach ($languages as $language) {
            $path = $this->path . DS . $this->folder . DS . $filename . '.' . $language . '.md';
            if (file_exists($path)) {
                $aPage = new Page();
                $aPage->init(new \SplFileInfo($path), $language . '.md');

                $route = $aPage->header()->routes['default'] ?? $aPage->rawRoute();
                if (!$route) {
                    $route = $aPage->route();
                }

                if ($onlyPublished && !$aPage->published()) {
                    continue;
                }

                $translatedLanguages[$language] = $route;
            }
        }

        return $translatedLanguages;
    }