get($className); } function project() { global $project; // Set default project if (empty($project) && file_exists(BASE_PATH . '/mysite')) { $project = 'mysite'; } return $project; } /** * This is the main translator function. Returns the string defined by $entity according to the * currently set locale. * * Also supports pluralisation of strings. Pass in a `count` argument, as well as a * default value with `|` pipe-delimited options for each plural form. * * @param string $entity Entity that identifies the string. It must be in the form * "Namespace.Entity" where Namespace will be usually the class name where this * string is used and Entity identifies the string inside the namespace. * @param mixed $arg,... Additional arguments are parsed as such: * - Next string argument is a default. Pass in a `|` pipe-delimeted value with `{count}` * to do pluralisation. * - Any other string argument after default is context for i18nTextCollector * - Any array argument in any order is an injection parameter list. Pass in a `count` * injection parameter to pluralise. * @return string */ function _t($entity, $arg = null) { // Pass args directly to handle deprecation return call_user_func_array([i18n::class, '_t'], func_get_args()); }