Skip to content

Commit

Permalink
switch back to $Locale from $lcl
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed May 21, 2024
1 parent 3ef93fa commit 96827e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions LitCalAllFestivities.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
$DataFile = RomanMissal::getSanctoraleFileName( $LatinMissal );
if( $DataFile !== false ) {
$I18nPath = RomanMissal::getSanctoraleI18nFilePath( $LatinMissal );
if( $I18nPath !== false && file_exists( $I18nPath . "/" . $lcl . ".json" ) ) {
$NAME = json_decode( file_get_contents( $I18nPath . "/" . $lcl . ".json" ), true );
if( $I18nPath !== false && file_exists( $I18nPath . "/" . $Locale . ".json" ) ) {
$NAME = json_decode( file_get_contents( $I18nPath . "/" . $Locale . ".json" ), true );
$DATA = json_decode( file_get_contents( $DataFile ), true );
foreach( $DATA as $idx => $festivity ) {
$key = $festivity[ "TAG" ];
Expand All @@ -99,7 +99,7 @@
}

$DataFile = 'data/propriumdetempore.json';
$I18nFile = 'data/propriumdetempore/' . $lcl . ".json";
$I18nFile = 'data/propriumdetempore/' . $Locale . ".json";
$DATA = json_decode( file_get_contents( $DataFile ), true );
$NAME = json_decode( file_get_contents( $I18nFile ), true );
foreach( $DATA as $key => $readings ) {
Expand All @@ -111,7 +111,7 @@
}

$DataFile = 'data/memorialsFromDecrees/memorialsFromDecrees.json';
$I18nFile = 'data/memorialsFromDecrees/i18n/' . $lcl . ".json";
$I18nFile = 'data/memorialsFromDecrees/i18n/' . $Locale . ".json";
$DATA = json_decode( file_get_contents( $DataFile ), true );
$NAME = json_decode( file_get_contents( $I18nFile ), true );
foreach( $DATA as $idx => $festivity ) {
Expand All @@ -121,8 +121,8 @@
$FestivityCollection[ $key ][ "NAME" ] = $NAME[ $key ];
if( array_key_exists( "decreeLangs", $festivity[ "Metadata" ] ) ) {
$decreeURL = sprintf( $festivity[ "Metadata" ][ "decreeURL" ], 'LA' );
if( array_key_exists(strtoupper($lcl), $festivity[ "Metadata" ][ "decreeLangs" ]) ) {
$decreeLang = $festivity[ "Metadata" ][ "decreeLangs" ][ strtoupper( $lcl ) ];
if( array_key_exists(strtoupper($Locale), $festivity[ "Metadata" ][ "decreeLangs" ]) ) {
$decreeLang = $festivity[ "Metadata" ][ "decreeLangs" ][ strtoupper( $Locale ) ];
$decreeURL = sprintf( $festivity[ "Metadata" ][ "decreeURL" ], $decreeLang );
}
} else {
Expand Down

0 comments on commit 96827e8

Please sign in to comment.