WIP
This commit is contained in:
1 parent
e227b24de5
commit
8c4e214e7b
2 files changed
+69
-38
No files matched your search
@@ -32,6 +32,20 @@ function translatable(string $text): array
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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