Quantcast
Viewing all articles
Browse latest Browse all 30

$sodapop->langPath($scope)

langPath() sets the path to the language files  

Parameters: $scope - sets the scope if the language to load, either application, app or template.  Expeciting: sodapop, template or app.

Location class.sodapop.php
public function langPath($scope) {
// Load Application Language
if ($scope == "sodapop") {
$langPath = "./language/lang." . $this->currentLanguage . ".php";
}
// Load Template Language
if ($scope == "template") {
$templatePath = $this->view->templatePath($this->template['name']);
$langPath = $templatePath . "/language/lang." . $this->currentLanguage . ".php";
}
// Load app Language
if ($scope == "app") {
$getApp = $this->pageData['getApp'];

// So, here we have to get the getApp from the database...
$langPath = "./apps/" . $getApp . "/language/lang." . $this->currentLanguage . ".php";
}
return $langPath;
}


Viewing all articles
Browse latest Browse all 30

Trending Articles