public transRoute ( string $routeName ) : string | ||
$routeName | string | Key of the translated string |
리턴 | string | Translated string |
public function transRoute($routeName)
{
if (!in_array($routeName, $this->translatedRoutes)) {
$this->translatedRoutes[] = $routeName;
}
return $this->translator->trans($routeName);
}
/** * Translate routes and save them to the translated routes array (used in the localize route filter) * * @param string $routeName Key of the translated string * @return string Translated string * @static */ public static function transRoute($routeName) { return \Mcamara\LaravelLocalization\LaravelLocalization::transRoute($routeName); }