WIP
This commit is contained in:
@@ -32,6 +32,20 @@ if (! function_exists('translatable')) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
function tr(string $text, string $locale = 'tk'): string
|
||||
{
|
||||
$text = json_decode($text);
|
||||
|
||||
if ($text) {
|
||||
$text->{$locale} ?? '';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
if (! function_exists('removeWhiteSpace')) {
|
||||
/**
|
||||
* Remove white sapce from string
|
||||
|
||||
Reference in New Issue
Block a user