public function translationsFolders()
    {
        $locale = Locale::parseLocale($this->_locale) + ['region' => null];

        $folders = [
            implode('_', [$locale['language'], $locale['region']]),
            $locale['language']
        ];

        $searchPaths = [];

        $localePaths = App::path('Locale');
        if (empty($localePaths) && defined('APP')) {
            $localePaths[] = APP . 'Locale' . DIRECTORY_SEPARATOR;
        }
        foreach ($localePaths as $path) {
            foreach ($folders as $folder) {
                $searchPaths[] = $path . $folder . DIRECTORY_SEPARATOR;
            }
        }

        // If space is not added after slash, the character after it remains lowercased
        $pluginName = Inflector::camelize(str_replace('/', '/ ', $this->_name));
        if (Plugin::isLoaded($pluginName)) {
            $basePath = Plugin::classPath($pluginName) . 'Locale' . DIRECTORY_SEPARATOR;
            foreach ($folders as $folder) {
                $searchPaths[] = $basePath . $folder . DIRECTORY_SEPARATOR;
            }
        }

        return $searchPaths;
    }
public function translationsFolders()
    {
        $locale = Locale::parseLocale($this->_locale) + ['region' => null];

        $folders = [
            implode('_', [$locale['language'], $locale['region']]),
            $locale['language']
        ];

        $searchPaths = [];

        $localePaths = App::path('Locale');
        if (empty($localePaths) && defined('APP')) {
            $localePaths[] = APP . 'Locale' . DIRECTORY_SEPARATOR;
        }
        foreach ($localePaths as $path) {
            foreach ($folders as $folder) {
                $searchPaths[] = $path . $folder . DIRECTORY_SEPARATOR;
            }
        }

        // If space is not added after slash, the character after it remains lowercased
        $pluginName = Inflector::camelize(str_replace('/', '/ ', $this->_name));
        if (Plugin::isLoaded($pluginName)) {
            $basePath = Plugin::classPath($pluginName) . 'Locale' . DIRECTORY_SEPARATOR;
            foreach ($folders as $folder) {
                $searchPaths[] = $basePath . $folder . DIRECTORY_SEPARATOR;
            }
        }

        return $searchPaths;
    }
public function translationsFolders ( ) { $ locale = Locale :: parseLocale ( $ this -> _locale ) + [ 'region' => null ] ; $ folders = [ implode ( '_' , [ $ locale [ 'language' ] , $ locale [ 'region' ] ] ) , $ locale [ 'language' ] ] ; $ searchPaths = [ ] ; $ localePaths = App :: path ( 'Locale' ) ; if ( empty ( $ localePaths ) && defined ( 'APP' ) ) { $ localePaths [ ] = APP . 'Locale' . DIRECTORY_SEPARATOR ; } foreach ( $ localePaths as $ path ) { foreach ( $ folders as $ folder ) { $ searchPaths [ ] = $ path . $ folder . DIRECTORY_SEPARATOR ; } } // If space is not added after slash, the character after it remains lowercased $ pluginName = Inflector :: camelize ( str_replace ( '/' , '/ ' , $ this -> _name ) ) ; if ( Plugin :: isLoaded ( $ pluginName ) ) { $ basePath = Plugin :: classPath ( $ pluginName ) . 'Locale' . DIRECTORY_SEPARATOR ; foreach ( $ folders as $ folder ) { $ searchPaths [ ] = $ basePath . $ folder . DIRECTORY_SEPARATOR ; } } return $ searchPaths ; }
Returns the folders where the file should be looked for according to the locale
and package name.

@return array The list of folders where the translation file should be looked for
Returns the folders where the file should be looked for according to the locale and package name .