public static function getCandidates($locale, $fallbackLocale = null)
    {
        $locale = self::replaceAlias($locale);
        $candidates = [$locale];
        while ($parent = self::getParent($locale)) {
            $candidates[] = $parent;
            $locale = $parent;
        }
        if (isset($fallbackLocale)) {
            $candidates[] = $fallbackLocale;
            while ($parent = self::getParent($fallbackLocale)) {
                $candidates[] = $parent;
                $fallbackLocale = $parent;
            }
        }

        return array_unique($candidates);
    }