src/Mcamara/LaravelLocalization/Traits/LoadsTranslatedCachedRoutes.php
protected function makeLocaleRoutesPath($locale, $localeKeys)
    {
        $path = $this->getDefaultCachedRoutePath();

        $localeSegment = request()->segment(1);
        if ( ! $localeSegment || ! in_array($localeSegment, $localeKeys)) {
            return $path;
        }

        return substr($path, 0, -4) . '_' . $locale . '.php';
    }
protected function makeLocaleRoutesPath($locale, $localeKeys)
    {
        $path = $this->getDefaultCachedRoutePath();

        $localeSegment = request()->segment(1);
        if ( ! $localeSegment || ! in_array($localeSegment, $localeKeys)) {
            return $path;
        }

        return substr($path, 0, -4) . '_' . $locale . '.php';
    }
Returns the path to the cached routes file for a given locale.

@param string   $locale
@param string[] $localeKeys
@return string