This commit is contained in:
Mekan1206
2026-05-04 16:31:51 +05:00
parent e227b24de5
commit 8c4e214e7b
2 changed files with 69 additions and 38 deletions

View File

@@ -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