From 738031a85355b5d4defdb95f76d873231b75ef8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 11 Jan 2021 17:42:49 +0300 Subject: [PATCH] search string boolen translations.. --- app/View/Components/SearchString.php | 4 ++-- config/search-string.php | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index 6bf3d25fd..b002132c2 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -168,11 +168,11 @@ class SearchString extends Component $values = [ [ 'key' => 0, - 'value' => trans('general.no'), + 'value' => empty($options['translations']) ? trans('general.no') : trans($options['translations'][0]), ], [ 'key' => 1, - 'value' => trans('general.yes'), + 'value' => empty($options['translations']) ? trans('general.yes') : trans($options['translations'][1]), ], ]; } else if ($search = request()->get('search', false)) { diff --git a/config/search-string.php b/config/search-string.php index 55587007d..406ab9a67 100644 --- a/config/search-string.php +++ b/config/search-string.php @@ -251,7 +251,13 @@ return [ 'enabled' => ['boolean' => true], 'precision', 'symbol', - 'symbol_first' => ['boolean' => true], + 'symbol_first' => [ + 'boolean' => true, + 'translations' => [ + 0 => 'currencies.symbol.after', + 1 => 'currencies.symbol.before', + ] + ], 'decimal_mark', 'thousands_separator', ],