Skip to content
This repository has been archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
Fix language selection dropdown lists
Browse files Browse the repository at this point in the history
  • Loading branch information
veggiematts committed Feb 21, 2020
1 parent 3b145f3 commit 732b861
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions LangCodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function getLanguage($code){
'de_DE'=>'de_DE',
'tr_TR'=>'tr_TR'
);
return array_key_exists($code, $all_lang) ? $all_lang[$code] : "en_US";
return array_key_exists($code, $all_lang) ? $all_lang[$code] : null;
}
public function getNameLang($code_lang){
$name_lang=array(
Expand All @@ -26,7 +26,7 @@ public function getNameLang($code_lang){
'de_DE'=>'Deutsch',
'tr_TR'=>'Türkçe'
);
return array_key_exists($code_lang, $name_lang) ? $name_lang[$code_lang] : "English";
return array_key_exists($code_lang, $name_lang) ? $name_lang[$code_lang] : null;
}

public function getBrowserLanguage() {
Expand Down
2 changes: 1 addition & 1 deletion auth/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion auth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion licensing/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion management/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion organizations/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion reports/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion resources/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion resources/templates/pig_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down
2 changes: 1 addition & 1 deletion usage/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
if (is_dir($route)) {
if ($dh = opendir($route)) {
while (($file = readdir($dh)) !== false) {
if (is_dir("$route/$file") && $file!="." && $file!=".."){
if (is_dir("$route/$file") && $file!="." && $file!=".." && $lang_name->getLanguage($file) != null){
$lang[]=$file;
}
}
Expand Down

0 comments on commit 732b861

Please sign in to comment.