src/Seboettg/CiteProc/StyleSheet.php
public static function loadLocales($langKey)
    {
        $data = null;
        $localesPath = self::vendorPath() . "/citation-style-language/locales/";
        $localeFile = $localesPath . "locales-" . $langKey . '.xml';
        if (file_exists($localeFile)) {
            $data = file_get_contents($localeFile);
        } else {
            $metadata = self::loadLocalesMetadata();
            if (!empty($metadata->{'primary-dialects'}->{$langKey})) {
                $data = file_get_contents($localesPath . "locales-" . $metadata->{'primary-dialects'}->{$langKey} . '.xml');
            }
        }

        return $data;
    }
public static function loadLocales($langKey)
    {
        $data = null;
        $localesPath = self::vendorPath() . "/citation-style-language/locales/";
        $localeFile = $localesPath . "locales-" . $langKey . '.xml';
        if (file_exists($localeFile)) {
            $data = file_get_contents($localeFile);
        } else {
            $metadata = self::loadLocalesMetadata();
            if (!empty($metadata->{'primary-dialects'}->{$langKey})) {
                $data = file_get_contents($localesPath . "locales-" . $metadata->{'primary-dialects'}->{$langKey} . '.xml');
            }
        }

        return $data;
    }
public static function loadLocales ( $ langKey ) { $ data = null ; $ localesPath = self :: vendorPath ( ) . "/citation-style-language/locales/" ; $ localeFile = $ localesPath . "locales-" . $ langKey . '.xml' ; if ( file_exists ( $ localeFile ) ) { $ data = file_get_contents ( $ localeFile ) ; } else { $ metadata = self :: loadLocalesMetadata ( ) ; if ( ! empty ( $ metadata -> { 'primary-dialects' } -> { $ langKey } ) ) { $ data = file_get_contents ( $ localesPath . "locales-" . $ metadata -> { 'primary-dialects' } -> { $ langKey } . '.xml' ) ; } } return $ data ; }
Loads xml formatted locales of given language key

@param string $langKey e.g. "en-US", or "de-CH"
@return string
@throws CiteProcException
Loads xml formatted locales of given language key