public static function getParent($locale)
    {
        $parent = null;
        if (isset(self::$parents[$locale])) {
            $parent = self::$parents[$locale];
        } elseif (strpos($locale, '-') !== false) {
            $localeParts = explode('-', $locale);
            array_pop($localeParts);
            $parent = implode('-', $localeParts);
        }
        // The library doesn't have data for the empty 'root' locale, it
        // is more user friendly to use the configured fallback instead.
        if ($parent == 'root') {
            $parent = null;
        }

        return $parent;
    }