-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from storypioneers/develop
Merge 1.5.1
- Loading branch information
Showing
3 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
|
||
/** | ||
* Selector. | ||
* | ||
* | ||
* Fileselect Field for Kirby 2 | ||
* | ||
* @version 1.5.0 | ||
* @version 1.5.1 | ||
* @author digital storytelling pioneers <[email protected]> | ||
* @author feat. Jonas Döbertin <[email protected]> | ||
* @copyright digital storytelling pioneers <[email protected]> | ||
|
@@ -143,9 +143,17 @@ class SelectorField extends BaseField | |
*/ | ||
public function __construct() | ||
{ | ||
// Load language files | ||
// Build translation file path | ||
$baseDir = __DIR__ . DS . self::LANG_DIR . DS; | ||
$lang = panel()->language(); | ||
|
||
// Get panel language | ||
if (version_compare(panel()->version(), '2.2', '>=')) { | ||
$lang = panel()->translation()->code(); | ||
} else { | ||
$lang = panel()->language(); | ||
} | ||
|
||
// Load language files | ||
if (file_exists($baseDir . $lang . '.php')) { | ||
require $baseDir . $lang . '.php'; | ||
} else { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters