Fix include language routes

This commit is contained in:
Tilen Gombac 2022-10-28 13:55:53 +02:00
parent 86f22214a2
commit 62b51ddd8c
9 changed files with 18 additions and 18 deletions

View File

@ -22,9 +22,9 @@ class PrijavaArnesModalBlock extends BlockBase {
*/
public function build() {
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -67,9 +67,9 @@ class PrijavaBlock extends BlockBase implements ContainerFactoryPluginInterface
$currentLanguage = \Drupal::languageManager()->getCurrentLanguage()->getId();
if($currentLanguage == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -21,9 +21,9 @@ class PrijavaIndividualnoSvetovanjeModalBlock extends BlockBase {
*/
public function build() {
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -23,9 +23,9 @@ class PrijavaIntroBlock extends BlockBase {
$currentLanguage = \Drupal::languageManager()->getCurrentLanguage()->getId();
if($currentLanguage == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -23,9 +23,9 @@ class PrijavaObnovitevGeslaAktivacijaBlock extends BlockBase {
$currentLanguage = \Drupal::languageManager()->getCurrentLanguage()->getId();
if($currentLanguage == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -21,9 +21,9 @@ class PrijavaObnovitevGeslaBlock extends BlockBase {
*/
public function build() {
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -21,9 +21,9 @@ class PrijavaPodatkiOUporabnikuBlock extends BlockBase {
*/
public function build() {
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
return [

View File

@ -25,11 +25,11 @@ class PrijavaZRacuniModalBlock extends BlockBase {
$url_google = 'https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=944153399779-m39ehn45vm6b64l0sac7hphtpm0esgqs.apps.googleusercontent.com&redirect_uri='.$redirect_url;
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
$url_google .= '&state=';
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
$url_google .= '&state=regFromEnglish';
}

View File

@ -22,9 +22,9 @@ class RegistracijaBlock extends BlockBase {
$currentLanguage = \Drupal::languageManager()->getCurrentLanguage()->getId();
if($currentLanguage == 'sl') {
include(__DIR__ . '../../../../../../../../../lang/1.php');
include(__DIR__ . '/../../../../../../../../../lang/1.php');
} else{
include(__DIR__ . '../../../../../../../../../lang/2.php');
include(__DIR__ . '/../../../../../../../../../lang/2.php');
}
// Naložimo 1ka nastavitve