controllers/manager/findi18n.php
public function getLiterals( $instance )
	{
		$path = \Sifo\Bootstrap::$application . "/$instance";

		// Parse all templates
		$literals_groups['tpl'] = $this->extractStringsForTranslation( "$path/templates", $instance, true );

		// Parse all models:
		$literals_groups['models'] = $this->extractStringsForTranslation( "$path/models", $instance, false );

		// Parse all controllers:
		$literals_groups['controllers'] = $this->extractStringsForTranslation( "$path/controllers", $instance, false );

		// Parse all form configs:
		$literals_groups['forms'] = $this->extractStringsForTranslation( "$path/config", $instance, false );

		// Smarty plugins:
		$sifo_plugins_path = ROOT_PATH . '/vendor/sifophp/sifo/src/Smarty-sifo-plugins';
		$literals_groups['smarty'] = $this->extractStringsForTranslation( $sifo_plugins_path, 'libs', false );

		// Your instance plugins:
		$instance_plugins = $path . '/templates/_smarty/plugins';
		if ( is_dir( $instance_plugins ) )
		{
			$literals_groups['smarty'] = array_merge( $literals_groups['smarty'], $this->extractStringsForTranslation( $instance_plugins, $instance, false ) );
		}

		$final_literals = array();

		foreach ( $literals_groups as $group )
		{
			foreach ( $group as $literal => $relative_path )
			{
				if ( array_key_exists( $literal, $final_literals ) )
				{
					$final_literals[$literal] = ( $final_literals[$literal] . ", " . $relative_path );
				}
				else
				{
					$final_literals[$literal] = $relative_path;
				}
			}
		}

		return $final_literals;
	}
public function getLiterals( $instance )
	{
		$path = \Sifo\Bootstrap::$application . "/$instance";

		// Parse all templates
		$literals_groups['tpl'] = $this->extractStringsForTranslation( "$path/templates", $instance, true );

		// Parse all models:
		$literals_groups['models'] = $this->extractStringsForTranslation( "$path/models", $instance, false );

		// Parse all controllers:
		$literals_groups['controllers'] = $this->extractStringsForTranslation( "$path/controllers", $instance, false );

		// Parse all form configs:
		$literals_groups['forms'] = $this->extractStringsForTranslation( "$path/config", $instance, false );

		// Smarty plugins:
		$sifo_plugins_path = ROOT_PATH . '/vendor/sifophp/sifo/src/Smarty-sifo-plugins';
		$literals_groups['smarty'] = $this->extractStringsForTranslation( $sifo_plugins_path, 'libs', false );

		// Your instance plugins:
		$instance_plugins = $path . '/templates/_smarty/plugins';
		if ( is_dir( $instance_plugins ) )
		{
			$literals_groups['smarty'] = array_merge( $literals_groups['smarty'], $this->extractStringsForTranslation( $instance_plugins, $instance, false ) );
		}

		$final_literals = array();

		foreach ( $literals_groups as $group )
		{
			foreach ( $group as $literal => $relative_path )
			{
				if ( array_key_exists( $literal, $final_literals ) )
				{
					$final_literals[$literal] = ( $final_literals[$literal] . ", " . $relative_path );
				}
				else
				{
					$final_literals[$literal] = $relative_path;
				}
			}
		}

		return $final_literals;
	}
public function getLiterals ( $ instance ) { $ path = \ Sifo \ Bootstrap :: $ application . "/$instance" ; // Parse all templates $ literals_groups [ 'tpl' ] = $ this -> extractStringsForTranslation ( "$path/templates" , $ instance , true ) ; // Parse all models: $ literals_groups [ 'models' ] = $ this -> extractStringsForTranslation ( "$path/models" , $ instance , false ) ; // Parse all controllers: $ literals_groups [ 'controllers' ] = $ this -> extractStringsForTranslation ( "$path/controllers" , $ instance , false ) ; // Parse all form configs: $ literals_groups [ 'forms' ] = $ this -> extractStringsForTranslation ( "$path/config" , $ instance , false ) ; // Smarty plugins: $ sifo_plugins_path = ROOT_PATH . '/vendor/sifophp/sifo/src/Smarty-sifo-plugins' ; $ literals_groups [ 'smarty' ] = $ this -> extractStringsForTranslation ( $ sifo_plugins_path , 'libs' , false ) ; // Your instance plugins: $ instance_plugins = $ path . '/templates/_smarty/plugins' ; if ( is_dir ( $ instance_plugins ) ) { $ literals_groups [ 'smarty' ] = array_merge ( $ literals_groups [ 'smarty' ] , $ this -> extractStringsForTranslation ( $ instance_plugins , $ instance , false ) ) ; } $ final_literals = array ( ) ; foreach ( $ literals_groups as $ group ) { foreach ( $ group as $ literal => $ relative_path ) { if ( array_key_exists ( $ literal , $ final_literals ) ) { $ final_literals [ $ literal ] = ( $ final_literals [ $ literal ] . ", " . $ relative_path ) ; } else { $ final_literals [ $ literal ] = $ relative_path ; } } } return $ final_literals ; }
Parses all templates, models, controllers, configs and Smarty plugins searching for strings used inside translation methods and returns them structured in an array.

@param string $instance Sifo instance to search in
@return array structured array where:
array key: The string to be translated (message).
array value: The different files which uses this message separated by commas.
Parses all templates models controllers configs and Smarty plugins searching for strings used inside translation methods and returns them structured in an array .