Arcanedev\Localization\Contracts\RouteTranslatorInterface::trans PHP 메소드

trans() 공개 메소드

Translate routes and save them to the translated routes array (used in the localize route filter).
public trans ( string $route, string | null $locale = null ) : string
$route string
$locale string | null
리턴 string
    public function trans($route, $locale = null);

Usage Example

예제 #1
0
 /**
  * Translate routes and save them to the translated routes array (used in the localize route filter).
  *
  * @param  string  $routeName
  *
  * @return string
  */
 public function transRoute($routeName)
 {
     return $this->routeTranslator->trans($routeName);
 }