Skip to content

Commit

Permalink
Translator facade improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMadness committed Jan 12, 2017
1 parent 404f5c1 commit 1337ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "professionalweb/pwf",
"version": "0.8.2",
"version": "0.8.3",
"description": "Professional web framework",
"homepage": "http://pwf.web-development.pw/",
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion framework/facades/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
class Translation
{

use \pwf\components\i18n\traits\ParamReplace;

/**
* Set current language
*
Expand Down Expand Up @@ -52,6 +54,6 @@ public static function translate($key, array $params = [], $default = '')
$result = Application::$instance->getComponent('i18n')->translate($key,
$params);

return empty($result) ? $default : $result;
return empty($result) ? self::prepareValue($default, $params) : $result;
}
}

0 comments on commit 1337ba5

Please sign in to comment.