37 $stylesPath = self::vendorPath().
"/citation-style-language/styles-distribution/";
38 return file_get_contents($stylesPath.$styleName.
'.csl');
51 $localesPath = self::vendorPath().
"/citation-style-language/locales/";
52 $localeFile = $localesPath.
"locales-".$langKey.
'.xml';
53 if (file_exists($localeFile)) {
54 $data = file_get_contents($localeFile);
57 if (!empty($metadata->{
'primary-dialects'}->{$langKey})) {
58 $data = file_get_contents(
59 $localesPath.
"locales-".$metadata->{
'primary-dialects'}->{$langKey}.
'.xml'
73 $localesMetadataPath = self::vendorPath().
"/citation-style-language/locales/locales.json";
74 return json_decode(file_get_contents($localesMetadataPath));
81 private static function vendorPath()
83 include_once realpath(__DIR__.
'/../').
'/vendorPath.php';
84 if (!($vendorPath = vendorPath())) {
86 throw new CiteProcException(
'vendor path not found. Use composer to initialize your project');